Help
I have a problem in sending a filter to a report.
I have a form set up to act as a small query builder with several option boxes and a start date and an end date.
Within VBA on the form I create a txt field where I create the WhereCondition for use in the DoCmd.OpenReport.
The report give seems to ignore the StartDate but is ok on the EndDate.
My code in my form for the date is
'Set up the where condition
where_stat = "Start_Date between #" & Me.StartDate & "# and #" & Me.EndDate & "#"
'Open the report
DoCmd.OpenReport "R_Client_Into_Training", acViewPreview, , where_stat
Start_Date is within the RecordSource of R_Client_Into_Training. StartDate and EndDate are the user input.
Any ideas welcome.
Much Thanks
Paul Tiernan
I have a problem in sending a filter to a report.
I have a form set up to act as a small query builder with several option boxes and a start date and an end date.
Within VBA on the form I create a txt field where I create the WhereCondition for use in the DoCmd.OpenReport.
The report give seems to ignore the StartDate but is ok on the EndDate.
My code in my form for the date is
'Set up the where condition
where_stat = "Start_Date between #" & Me.StartDate & "# and #" & Me.EndDate & "#"
'Open the report
DoCmd.OpenReport "R_Client_Into_Training", acViewPreview, , where_stat
Start_Date is within the RecordSource of R_Client_Into_Training. StartDate and EndDate are the user input.
Any ideas welcome.
Much Thanks
Paul Tiernan