In a form I am adding a new record to TblRequirement
The form data entry property is set to yes
In a text box I enter a job number
In a second text box I do a LookUp from a different table to populate
This works well as long as the job number is valid
I am checking for valid job number with the following code.
Private Sub Job_Click()
If IsNull(Job) Or Job < 1000 Or Job > 9999 Then
MsgBox "Invalid Job Number - Reenter"
DoCmd.Close
DoCmd.OpenForm "FrmRequirementAdd"
End If
End Sub
This does not catch the null or the < or the >
What am I doing wrong
Thanks