Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Type Mismatch message

Status
Not open for further replies.

Fireman1143

IS-IT--Management
Mar 5, 2002
51
US
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.
 
That was it. So simple and obvious I missed it.

Thanks Duane
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top