Fireman1143
IS-IT--Management
I have a report which I call from a button with the following code:
Private Sub btnPrintReceipt_Click()
On Error GoTo Err_btnPrintReceipt_Click
Dim stDocName As String
Dim StrCriterion As String
stDocName = "Payment Receipt"
StrCriterion = "[ReceiptNo]=" & sbfProgramsSigned.Form![ReceiptNo]
DoCmd.OpenReport stDocName, acViewPreview, , StrCriterion
DoCmd.Close "frmProgramSignup"
Exit_btnPrintReceipt_Click:
Exit Sub
Err_btnPrintReceipt_Click:
MsgBox Err.Description
Resume Exit_btnPrintReceipt_Click
End Sub
It previews the report perfectly, but has a "Type Mismatch" message with OK button in middle of screen.
[ReceiptNo] is an integer (long). I tried various changes but haven't been able to get it.
Private Sub btnPrintReceipt_Click()
On Error GoTo Err_btnPrintReceipt_Click
Dim stDocName As String
Dim StrCriterion As String
stDocName = "Payment Receipt"
StrCriterion = "[ReceiptNo]=" & sbfProgramsSigned.Form![ReceiptNo]
DoCmd.OpenReport stDocName, acViewPreview, , StrCriterion
DoCmd.Close "frmProgramSignup"
Exit_btnPrintReceipt_Click:
Exit Sub
Err_btnPrintReceipt_Click:
MsgBox Err.Description
Resume Exit_btnPrintReceipt_Click
End Sub
It previews the report perfectly, but has a "Type Mismatch" message with OK button in middle of screen.
[ReceiptNo] is an integer (long). I tried various changes but haven't been able to get it.