Hi,
I am having a little difficulty with my report filter. How to I make the filter form so that the user can select from different date fields for the start date and end date to pull from?? For example have the option so that the user can sort start to end date from IssueDate, InitActDave, or CRODate?? I have turned on the filter for the form. This is the query behind the form:
This is the code for the button to filter the form:
Now I am getting this error: "Syntax Error (Missing Operator) in query expression '(Between #1/1/01# AND #1/1/07#)'"
I am at a loss for what to do, I would really appreciate any help!
Thanks,
Shawn
I am having a little difficulty with my report filter. How to I make the filter form so that the user can select from different date fields for the start date and end date to pull from?? For example have the option so that the user can sort start to end date from IssueDate, InitActDave, or CRODate?? I have turned on the filter for the form. This is the query behind the form:
Code:
SELECT tblEnforcement.initActDate, tblEnforcement.croDate, tblEnforcement.issueDate, tblEnforcement.[103], tblEnforcement.[103CR], tblEnforcement.[112R1], tblEnforcement.[112R2], tblEnforcement.[304], tblEnforcement.[304CR], tblEnforcement.[312], tblEnforcement.[313], tblEnforcement.[313DQ], tblEnforcement.[313LR], tblEnforcement.[313NR], tblEnforcement.[6PC], tblEnforcement.[6PD], tblEnforcement.[6PE], tblEnforcement.[6PG], tblEnforcement.[6PL], tblEnforcement.[6PI], tblEnforcement.[6RK], tblEnforcement.[6PM], tblEnforcement.[6PN], tblEnforcement.[6PR], tblEnforcement.[6PS], tblEnforcement.[6PT], tblEnforcement.[6PV], tblEnforcement.[6PU], tblEnforcement.[6PW], tblEnforcement.[6PZ]
FROM tblEnforcement;
This is the code for the button to filter the form:
Code:
Dim myCriteria
Select Case pick
Case 1
myCriteria = "IssueDate"
Case 2
myCriteria = "InitActDate"
Case 3
myCriteria = "croDate"
End Select
myCriteria = myCriteria & " Between #" & [Forms]![pickDateRange]![txtdatefrom] & _
"# And #" & [Forms]![pickDateRange]![txtdateTo] & "#"
DoCmd.openReport "CaseSummary", acViewPreview, , myCriteria
Now I am getting this error: "Syntax Error (Missing Operator) in query expression '(Between #1/1/01# AND #1/1/07#)'"
I am at a loss for what to do, I would really appreciate any help!
Thanks,
Shawn