I have this set as the onclick event procedure for a command button on
a form:
Private Sub cmdPrintRecord_ Click()
Dim strReportName As String
Dim strCriteria As String
strReportName = "rptPrintRecord "
strCriteria = "[ID]='" & Me![ID] & "'"
DoCmd.OpenRepor t strReportName, acViewPreview, , strCriteria
End Sub
to print (preview) the record currently "on-screen" and a report named
"rptPrintRecord " yet I am having an error returned:
Data type mismatch in criteria expression
Can anyone help?
Thanks
Bob
a form:
Private Sub cmdPrintRecord_ Click()
Dim strReportName As String
Dim strCriteria As String
strReportName = "rptPrintRecord "
strCriteria = "[ID]='" & Me![ID] & "'"
DoCmd.OpenRepor t strReportName, acViewPreview, , strCriteria
End Sub
to print (preview) the record currently "on-screen" and a report named
"rptPrintRecord " yet I am having an error returned:
Data type mismatch in criteria expression
Can anyone help?
Thanks
Bob
Comment