Acess 97--Print Multiple Reports using same parameter

B

Boz

I have several databases all running on Access 97. In two of them there are
4 reports that all require an [Enter Date] parameter. None of them use be
'between [Enter Start Date] and [Enter End Date].

I would like to create a macro that will prompt me for the date once, then
print the requested reports.

Any help you can provide would be appreciated.
 
S

Steve Schapel

Boz,

I would suggest you put an unbound textbox on a form which will be open
at the time that the reports are printed, where you can enter the date.
Then, in the queries that the reports are based on, in the place of
the [Enter Date] paramter prompt, you instead put a reference to the
control on the form into the criteria for the date field, using syntax
such as this...
[Forms]![NameOfYourForm]![NameOfTextbox]
 
B

Boz

Thanks Steve.....this works (sort of). I can actually get all of the reports
to print without having to enter the date numerous times, however, I am not
getting any data. I have tried changing the format for the text box to Short
Date, Long Date, Text, you name it, I've tried it. Still no data. The data
type in the table I'm pulling from is 'Short Date' with the following input
mask: 99/99;0;_

Any help would be greatly appreciated.

Boz

Steve Schapel said:
Boz,

I would suggest you put an unbound textbox on a form which will be open
at the time that the reports are printed, where you can enter the date.
Then, in the queries that the reports are based on, in the place of
the [Enter Date] paramter prompt, you instead put a reference to the
control on the form into the criteria for the date field, using syntax
such as this...
[Forms]![NameOfYourForm]![NameOfTextbox]

--
Steve Schapel, Microsoft Access MVP

I have several databases all running on Access 97. In two of them there are
4 reports that all require an [Enter Date] parameter. None of them use be
'between [Enter Start Date] and [Enter End Date].

I would like to create a macro that will prompt me for the date once, then
print the requested reports.

Any help you can provide would be appreciated.
 
S

Steve Schapel

Boz,

The format doesn't matter, all this affects is the appearance, not the
value.

I don't understand the input mask. Nor why you would use an input mask
for a date field. But anyway, that's probably not relevant.

Try this... Open the form, and enter a date criteria in the textbox.
Then open one of the queries that you use for the report, and run it
(click the toolbar button with the red [!] icon), and see if it returns
the expected records.

Have a look in the table, and check that the data in the date field is
as expected.

Otherwise, copy/paste the SQL view of the query into your post here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top