Pass Date Values to display report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report that a user can click to view on a report menu. I would like
them to be able to enter 2 different dates (i.e. view data between July 1,
2005 and October 31, 2005) and have the report only show that data. How can
I program the form to pass this data to the report?
 
Use the where condition on the OpenReport command line

Dim MyWhereCondition as String
MyWhereCondition= "[Date Field Name] Between #" & Me.StartDate & "# And #"
& Me.EndDate & "#"
Docmd.OpenReport "ReportName",,,MyWhereCondition
 
Thanks!!! That worked great....

Ofer said:
Use the where condition on the OpenReport command line

Dim MyWhereCondition as String
MyWhereCondition= "[Date Field Name] Between #" & Me.StartDate & "# And #"
& Me.EndDate & "#"
Docmd.OpenReport "ReportName",,,MyWhereCondition
--
If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benefit from it.

Good luck



HeatherD25 said:
I have a report that a user can click to view on a report menu. I would like
them to be able to enter 2 different dates (i.e. view data between July 1,
2005 and October 31, 2005) and have the report only show that data. How can
I program the form to pass this data to the report?
 
Back
Top