S
Sprinks
The following code is generating this error. It displays the expected
criteria string in the window surrounded by single quotes and parentheses,
like:
'(criteria string)'
I can't figure it out; I'm using the same code elsewhere without issue.
txtLastDate is an unbound textbox assigned in the On Open event to the value
of a Date variable. txtFirstDate is bound to the expression:
=CDate(Month([txtLastDate]) & "/1/" & Year([txtLastDate]))
'Code
' Print monthly PM report
intPrintPMReport = MsgBox("Print monthly PM report?", _
vbOKCancel + vbDefaultButton1, _
"Print Monthly PM Report")
If intPrintPMReport = vbOK Then
strRptName = "MonthlyActivityReportByProjectPM"
strCriteria = "Between #" & Me![txtFirstDate] & _
"# And #" & Me![txtLastDate]
DoCmd.OpenReport strRptName, acViewPreview, , strCriteria
End If
Thank you for any assistance.
Sprinks
criteria string in the window surrounded by single quotes and parentheses,
like:
'(criteria string)'
I can't figure it out; I'm using the same code elsewhere without issue.
txtLastDate is an unbound textbox assigned in the On Open event to the value
of a Date variable. txtFirstDate is bound to the expression:
=CDate(Month([txtLastDate]) & "/1/" & Year([txtLastDate]))
'Code
' Print monthly PM report
intPrintPMReport = MsgBox("Print monthly PM report?", _
vbOKCancel + vbDefaultButton1, _
"Print Monthly PM Report")
If intPrintPMReport = vbOK Then
strRptName = "MonthlyActivityReportByProjectPM"
strCriteria = "Between #" & Me![txtFirstDate] & _
"# And #" & Me![txtLastDate]
DoCmd.OpenReport strRptName, acViewPreview, , strCriteria
End If
Thank you for any assistance.
Sprinks