By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,647 Members | 1,598 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,647 IT Pros & Developers. It's quick & easy.

Opening subreports with dates

P: n/a
I have a report that includes 5 different subreports. I'd like to be
able to open this report using a date function (Start Date and End Date).
I'd like all five subreports to show the data from those dates. I have
learned how to use this start/end function but I can't figure out how to use
it with these subreports. Right now the report opens but asks for start/end
dates for each of the five reports. Is there a way I can input one set of
dates and have all five reports show up using the same dates?
I hope I haven't confused this.
I'm also using a form switchboard for activating this report, if
switchboard is the correct word. The switchboard at this time has 4
different reports that can be accessed. The first three are very basic
reports so when I use the start/end date function it works very well for the
individual report I'm trying to access. However the report that has the
five subreports is more difficult. I guess I could input a start/date for
each of the five subreports but that seems to be very time consuming and
wasteful. I'm sure there is a way to do this I just don't know how.
I'll bet now I've confused the issue. If so let me know and I'll try a
different approach.
Thanks for your continued help,
Don.......
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
To enter the dates once for all subreports, you need to get them to read the
dates from a form. It can be your switchboard, or a form designed
specifically form the purpose.

Let's assume you have a form named "Switchboard", with text boxes name
txtStartDate and txtEndDate. Set the Format property of these text boxes to:
Short Date
so Access won't accept any invalid date.

Now open the query that is the RecordSource for your first subreport. In
query design, choose Parameters from the Query menu. Access opens a dialog.
Enter two rows, like this:
[Forms].[Switchboard].[txtStartDate] Date/Time
[Forms].[Switchboard].[txtEndDate] Date/Time

Repeat for the other subreports.

Now when you open the main report, each of the subreports will read the
dates from the form. This assumes that the form is open and the dates are
filled in when you run the report.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Don Sealer" <vz******@verizon.net> wrote in message
news:rW2Ad.15024$EL5.8268@trndny09...
I have a report that includes 5 different subreports. I'd like to be
able to open this report using a date function (Start Date and End Date).
I'd like all five subreports to show the data from those dates. I have
learned how to use this start/end function but I can't figure out how to
use
it with these subreports. Right now the report opens but asks for
start/end
dates for each of the five reports. Is there a way I can input one set of
dates and have all five reports show up using the same dates?
I hope I haven't confused this.
I'm also using a form switchboard for activating this report, if
switchboard is the correct word. The switchboard at this time has 4
different reports that can be accessed. The first three are very basic
reports so when I use the start/end date function it works very well for
the
individual report I'm trying to access. However the report that has the
five subreports is more difficult. I guess I could input a start/date for
each of the five subreports but that seems to be very time consuming and
wasteful. I'm sure there is a way to do this I just don't know how.
I'll bet now I've confused the issue. If so let me know and I'll try a
different approach.
Thanks for your continued help,
Don.......

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.