A
AccessNeophyte
Greetings all,
I've been researching this in this Group, and some answers have come
close, but ... no cigar. So let's see if I can explain this
correctly.
I've got a report that has 2 subreports in the Detail section, each of
which has it's own query. When I simply run the report (without a
RecordSource), it prints both subreports nicely on one page. It
prompts me twice for [Starting Date] and [Ending Date] though - once
for each subreport/subquery. That's not the major thing, though.
In the ReportHeader, I refer to the [Starting Date] twice, once for
month "mmmm" and once for year "yyyy" Also, in the PageFooter, I
refer to both dates with this string, as a date range:
=(Format([Starting Date],"mm/dd/yyyy")) & " " & "to" & " " &
(Format([Ending Date],"mm/dd/yyyy")). As an aside (possibly relevant),
if I run the report without a RecordSource, as above, the ReportHeader
and PageFooter references return #Name?
The problem is this:
1) If I use either subreport query as the ControlSource for any of
these date controls on the Report, like this: {=Format([BMC Monthly
Bed Days SubQuery - Bed Days]!Expr1,"mmmm")}, I get the same number of
duplicate pages of the same report as the number of records that the
subreport query returns. Subreport returns 37 records, I get 37 pages
of the same report. All 37 pages have the correct dates and formats
in the ReportHeader and PageFooter references, though.
2) If I create a query as a RecordSource for the Report, using the
same prompts as the subreport queries, [Starting Date] and [Ending
Date], with the master table as the query's source, I get the same
number of duplicate pages of the same report as the number of records
in the master table (164 records, 164 pages).
3) If I use the master table as the RecordSource for the report, I
get the same result as in #2.
4) But with 2 and 3, the ReportHeader and PageFooter references
return #Name?
Any idea what I'm doing wrong? Would I have more success with a
Dialog Box (if I can figure out how to use one)?
Thanks in advance!!!
Liz
I've been researching this in this Group, and some answers have come
close, but ... no cigar. So let's see if I can explain this
correctly.
I've got a report that has 2 subreports in the Detail section, each of
which has it's own query. When I simply run the report (without a
RecordSource), it prints both subreports nicely on one page. It
prompts me twice for [Starting Date] and [Ending Date] though - once
for each subreport/subquery. That's not the major thing, though.
In the ReportHeader, I refer to the [Starting Date] twice, once for
month "mmmm" and once for year "yyyy" Also, in the PageFooter, I
refer to both dates with this string, as a date range:
=(Format([Starting Date],"mm/dd/yyyy")) & " " & "to" & " " &
(Format([Ending Date],"mm/dd/yyyy")). As an aside (possibly relevant),
if I run the report without a RecordSource, as above, the ReportHeader
and PageFooter references return #Name?
The problem is this:
1) If I use either subreport query as the ControlSource for any of
these date controls on the Report, like this: {=Format([BMC Monthly
Bed Days SubQuery - Bed Days]!Expr1,"mmmm")}, I get the same number of
duplicate pages of the same report as the number of records that the
subreport query returns. Subreport returns 37 records, I get 37 pages
of the same report. All 37 pages have the correct dates and formats
in the ReportHeader and PageFooter references, though.
2) If I create a query as a RecordSource for the Report, using the
same prompts as the subreport queries, [Starting Date] and [Ending
Date], with the master table as the query's source, I get the same
number of duplicate pages of the same report as the number of records
in the master table (164 records, 164 pages).
3) If I use the master table as the RecordSource for the report, I
get the same result as in #2.
4) But with 2 and 3, the ReportHeader and PageFooter references
return #Name?
Any idea what I'm doing wrong? Would I have more success with a
Dialog Box (if I can figure out how to use one)?
Thanks in advance!!!
Liz