I am getting an error message when clicking on a preview button to retreive a report for the record shown and can't figure out why. The code is
Private Sub PrintPreview_Click()
Dim strReportName As String
Dim strCriteria As String
strReportName = "rptSales"
strCriteria = "[sales_id]=" & Me![sales_id] & ""
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
End Sub
Attached is the db. Thanks for any help.
Private Sub PrintPreview_Click()
Dim strReportName As String
Dim strCriteria As String
strReportName = "rptSales"
strCriteria = "[sales_id]=" & Me![sales_id] & ""
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
End Sub
Attached is the db. Thanks for any help.