using the same subreport but with different queries (1 Viewer)

Chrisopia

Registered User.
Local time
Yesterday, 22:24
Joined
Jul 18, 2008
Messages
279
I am creating an end of week report, which needs information from Sat-Fri,
so basically it will be one sub form, but used 6 times.

I'd prefer not to have to make 6 subforms, with 6 queries, but rather using 1 subform and 1 query 6 times.

For example, on the parent form, I will add the subforms, and name them "Sat", "Mon", "Tue" etc...
I want to make one query that filters the information based on the name of the subform:
Day: Format([Date],"ddd")
Where: Day = Me.Name

I can't figure out what to ask the query to refer to, to retrieve the name of the subform it's currently sat in.

Unless you can think of a better way to achieve this?
 

burrina

Registered User.
Local time
Today, 00:24
Joined
May 10, 2014
Messages
972
Change the record source of the form for your requirements. Use different queries for the filtered results.

HTH
 

Chrisopia

Registered User.
Local time
Yesterday, 22:24
Joined
Jul 18, 2008
Messages
279
ah - I thought I found the solution, but it turns out, you can't use the same subform twice... that's annoying.

Plan B: make a big subform to include all 6 days
 

burrina

Registered User.
Local time
Today, 00:24
Joined
May 10, 2014
Messages
972
You CAN use the same form for many purposes, just changing it's record source. Most likely as you said, a design issue, hard to tell without seeing.

Good Luck!
 

Users who are viewing this thread

Top Bottom