Rather than using a form based on a query with criteria, could I use something like this:
Dim myJobRef As Variant
myJobRef = DLookup("[T-cardnumber]", "[tblMain]")
InputBox "Enter Job Number", "Job Number Required", myJobRef
If IsNull(myJobRef) Then
MsgBox "Job not there"
DoCmd.OpenForm "frmMain", acNormal, , "[T-cardnumber] = " & CLng(myJobRef)
That asks the user to enter a job number. If that job number exists in tblMain it will open a form called frmMain and display that record. If the record does not exist in tblMain the user will get a messagebox "does not exist".