Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print a series of reports for a specified day.

Status
Not open for further replies.

Vandelay

Programmer
Jun 22, 2003
95
US
Hi.

How do I code a button so I can print multiple types of reports all on a specific day?

I found a code to print only current report from a form screen, but I tried to modify it to work with what I want but I can't get it to go. Please Help!
 
if you are generating one report, probably the easiest thing to do is in your query, withing the date field criteria enter...

[Enter Date]

this will cause Access to prompt the user for a date.

if you wanted to pull you report based on a date range you would enter in your criteria...

Between [Begin Date] and [End Date]

this will cause Access to prompt the user for a begin date and then an end date.

if you are generating multiple reports based on the same date specs rather than having the user retype the date specs over and over, try this...

create a form (if you don't have one already)

put an unbound text box (i.e. combo, list) on your form

within each of the queries that generate your reports, include this field name as your criteria for the date field.

for example, in the query criteria, type....

Forms!Formname!Fieldname.value

(a more practical example might look like this....
Forms!Form1!date.value)

if you wanted to pull a certain date range you would enter
in the criteria section....

Between Forms!Formname!BeginDate.value and Forms!Formname!EndDate.value

for this example, you would need to create a field on your form for both begin date and end date. make sure you use the same field names, and that you specify the same form name in your criteria as you do on your form. for example, don't call the field on the form BeginDate and then in the query criteria call it StartDate.

hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top