I am trying to pass an invoice number(a string) to another form.
Private Sub Form_Open(Cancel As Integer)
If VarType(Me.OpenArgs) <> vbString Then
MsgBox ("Not a string")
Else
MsgBox Me.OpenArgs
End If
Me.RecordSource = " SELECT tickt.* from tickt where tickt.inv_no = " & Me.OpenArgs
End Sub
I get a Data Type mismatch in criteria expression. I checked to make sure it was a string and I am trying to select a string value. What I am missing?