parameters again? print? export?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report that pulls from about 20 queries, which pulls from about 10
fields in my table. For each field the queries contain the parameter
“Between [START DATE] and [END DATE]†this works, but it literally asks me
the start and end date 10 times when I run the report.

My more serious problem is when I print or export it asks me for the
parameters again. I don’t know how many times because I never finished.. its
atleast 20. If I don’t enter them again it prints a blank report.

I prefer to access the report from the reports menu. To get around this
blank report I created new form and a button that saves the report to file.
That works fine. (If you don’t mind entering the parameter 10 times) But id
rather not create an additional form.

Anyone have a suggestion? Thanks…
 
If you already have a form, why not add a pair of text boxes for the dates?

The first one would have properties like this:
Name txtStartDate
Format Short Date
and the second:
Name txtEndDate
Format Short Date

Now in your query, you can refer to these dates by using:
Between [Forms].[Form1].[txtStartDate] And [Forms].[Form1].[txtEndDate]
replacing "Form1" with the name of your form. Now you enter the dates on the
form once, and the queries and reports read the values from there.

If you prefer, you can add a command button to OpenReport with a
WhereCondition. For details on this technique, see:
Limiting a Report to a Date Range
at:
http://allenbrowne.com/casu-08.html
 
thanks. works great. i did add and hide a table with those two fields. if
you had something else in mind let me know.

Allen Browne said:
If you already have a form, why not add a pair of text boxes for the dates?

The first one would have properties like this:
Name txtStartDate
Format Short Date
and the second:
Name txtEndDate
Format Short Date

Now in your query, you can refer to these dates by using:
Between [Forms].[Form1].[txtStartDate] And [Forms].[Form1].[txtEndDate]
replacing "Form1" with the name of your form. Now you enter the dates on the
form once, and the queries and reports read the values from there.

If you prefer, you can add a command button to OpenReport with a
WhereCondition. For details on this technique, see:
Limiting a Report to a Date Range
at:
http://allenbrowne.com/casu-08.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Joe said:
I have a report that pulls from about 20 queries, which pulls from about 10
fields in my table. For each field the queries contain the parameter
"Between [START DATE] and [END DATE]" this works, but it literally asks me
the start and end date 10 times when I run the report.

My more serious problem is when I print or export it asks me for the
parameters again. I don't know how many times because I never finished..
its
atleast 20. If I don't enter them again it prints a blank report.

I prefer to access the report from the reports menu. To get around this
blank report I created new form and a button that saves the report to
file.
That works fine. (If you don't mind entering the parameter 10 times) But
id
rather not create an additional form.

Anyone have a suggestion? Thanks.
 
There's no need for the table unless you want Access to remember the dates
for next time. Unbound controls work fine.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Joe said:
thanks. works great. i did add and hide a table with those two fields.
if
you had something else in mind let me know.

Allen Browne said:
If you already have a form, why not add a pair of text boxes for the
dates?

The first one would have properties like this:
Name txtStartDate
Format Short Date
and the second:
Name txtEndDate
Format Short Date

Now in your query, you can refer to these dates by using:
Between [Forms].[Form1].[txtStartDate] And
[Forms].[Form1].[txtEndDate]
replacing "Form1" with the name of your form. Now you enter the dates on
the
form once, and the queries and reports read the values from there.

If you prefer, you can add a command button to OpenReport with a
WhereCondition. For details on this technique, see:
Limiting a Report to a Date Range
at:
http://allenbrowne.com/casu-08.html

Joe said:
I have a report that pulls from about 20 queries, which pulls from about
10
fields in my table. For each field the queries contain the parameter
"Between [START DATE] and [END DATE]" this works, but it literally asks
me
the start and end date 10 times when I run the report.

My more serious problem is when I print or export it asks me for the
parameters again. I don't know how many times because I never
finished..
its
atleast 20. If I don't enter them again it prints a blank report.

I prefer to access the report from the reports menu. To get around
this
blank report I created new form and a button that saves the report to
file.
That works fine. (If you don't mind entering the parameter 10 times)
But
id
rather not create an additional form.
 
Back
Top