Between Function

  • Thread starter Thread starter Craig Ferrier
  • Start date Start date
C

Craig Ferrier

I am running a query based on donations received within a certain date.

The "Criteria" in the query is :

Between [Enter First Date - Format 00/00/00] And [Enter Last Date - Format
00/00/00]

This gives me a message box asking to input the two dates.

This query is attached to a report listing all of the donation recieved
within the two dates.

Is there some way of capturing the two dates that have been input so I can
display the dates on the report?

Thanks
Craig
 
One way to do this would be to create a Parameter form and then reference
the fields from the Parameter form in the report.

Create a form (frmParamsForm) with 2 Textboxes (txtbox1 and txtbox2 into
which the from and to dates will be entered)

In the query, for you criteria type Between [Forms]![ParamsForm]![txtbox1]
And [Forms]![ParamsForm]![txtbox2]

Then in the report reference the 2 text box from the form (i.e.
[Forms]![ParamsForm]![txtbox1] etc)

hth
 
You can use the parameters on the report as if they were field names.

Add a control and set it's source to

=[Enter First Date - Format 00/00/00] & " to " & [Enter Last Date - Format 00/00/00]

You must enter the parameter EXACTLY as it is entered in the query.
 
Back
Top