Include query criteria in report

  • Thread starter Thread starter Lynn Trapp
  • Start date Start date
L

Lynn Trapp

Use a form to launch your report. Place a textbox on the form for Beginning
Date and one for Ending Date. Have the query reference those textboxes for
it's criteria. The basic syntax of that is:

Forms!YourForm!YourTextBox
 
I have a report that is generated with a query with "between dates" criteria
in the query.

How can I include the dates used for the query criteria in the report?

I'd like to put the info in the page header such as: "Production Report for
1/1/04 to 3/31/04" whre the two dates are the criteria from the query.

Office 2000 Pro

Thanks
Mack Neff
 
I have a report that is generated with a query with "between dates" criteria
in the query.

How can I include the dates used for the query criteria in the report?

I'd like to put the info in the page header such as: "Production Report for
1/1/04 to 3/31/04" whre the two dates are the criteria from the query.

Office 2000 Pro

Thanks
Mack Neff

If the query criteria is written as:
Between [Enter Start] and [Enter End]
then, in the report header, add an unbound control.
Set it's control source to:

= "Production Report for " & [Enter Start] & " to " & [Enter End]

The text within the brackets must be identical to the bracketed text
in the query.
 
Mack,

In your query you have criteria for a date field that should look like
=[Enter begin date] AND <=[Enter end date]

Well, in your report, create the text box to display the date range and your
'unbound' text box will have the following controlsource
=[Enter begin date] & " to " & [Enter end date]
or
="Date range used for this report: " & [Enter begin date] & " to " & [Enter
end date]

Basically, if you put criteria that prompts a user, then just refer to the
[whatever] in your report and it will show you what the user typed in.

Hope this helps.

Mark
 
Back
Top