Jimmy W said:
I have a report based on a query. I need to be able to be "asked" what date
to select the data for the report. What is the easiest way to do that?
The quick and dirty way is to use a criteria like:
=[Enter Date]
A better way is to create a form with a text box for the
date and a button to open the report. In this case the
query criteria would be like:
Forms![the form name].[the text box name]
The best way is to use the form and remove the criteria from
the query. The button's code would then use the OpenReport
method's WhereCondition argument to filter the report. E.g.
stCriteria = "the date field name] = " & Format(Me.[the text
box name], "\#yyyy-m-d\#")
DoCmd.OpenReport "the report name", acviewPreview, _
WhereCondition:= stCriteria