Entries by date

bgcogen

Registered User.
Local time
Today, 19:10
Joined
Apr 19, 2002
Messages
61
Hi.
Can anyone help me?? :-o
Basically I've got to generate a report based on a bunch of records in a table that all have dates associated with them. Grand.
But the problem is I've got to show only record between two values entered in a form: begin date and end date.

Is there any way to do this does anyone know???

Thanks,
D
 
Sure. On the onClick for the button to open the report, put the following in vbCode:

DoCmd.OpenReport "YourReportName",acPreview,,"[Date] Between #" & [Forms]![YourFormName]![BeginDate] & "# And # " & [Forms]![YourFormName]![EndDate] & "#"

You should also be able to put this data in the Filter line of the Report properties if this is the only way you open this report.

You could also create a parameter query and base the report off of that query. This would cue the user to enter the start and end dates every time the report is opened.
 
Thnaks

Thanks, I'll give it a try :-)
 

Users who are viewing this thread

Back
Top Bottom