G
Guest
I have this code I got from mskb article 209560 and I am having a problem with it.
The criteria is set to the Customer ID in the Northwinds DB which is a text data type, the id that I am using is a number, so I recieve a runtime error 3464 message. How di I convert this code to work with a number data type.
Private Sub cmdPrintRecord_Click()
Dim strReportName As String
Dim strCriteria As String
strReportName = "rptPrintRecord"
strCriteria = "[CustomerID]='" & Me![CustomerID] & "'"
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
End Sub
The criteria is set to the Customer ID in the Northwinds DB which is a text data type, the id that I am using is a number, so I recieve a runtime error 3464 message. How di I convert this code to work with a number data type.
Private Sub cmdPrintRecord_Click()
Dim strReportName As String
Dim strCriteria As String
strReportName = "rptPrintRecord"
strCriteria = "[CustomerID]='" & Me![CustomerID] & "'"
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
End Sub