The following code is to notify the required fields are not left blank.
If I use the following statement it works fine.
Private Sub NewEntryBtn_Click()
If IsNull(Me.ItmBookNo) Then
MsgBox "Please Enter Book #", vbOKOnly
Exit Sub
End If
DoCmd.GoToRecord , "", acNewRec
Exit Sub
If Not IsNull(Me.ItmBookNo) Then
End If
End Sub
I tried the following and is not working.
Private Sub NewEntryBtn_Click()
If IsNull(Me.ItmBookNo) Then
MsgBox "Please Enter Book #", vbOKOnly
Exit Sub
End If
DoCmd.GoToRecord , "", acNewRec
Exit Sub
If Not IsNull(Me.ItmBookNo) Then
End If
If IsNull(Me.ItemUsedInArea) Then
MsgBox "Please Enter Area Used At", vbOKOnly
Exit Sub
End If
DoCmd.GoToRecord , "", acNewRec
Exit Sub
If Not IsNull(Me.ItemUsedInArea) Then
End If
If IsNull(Me.ItmCatagory) Then
MsgBox "Please Enter Contractor Name", vbOKOnly
Exit Sub
End If
DoCmd.GoToRecord , "", acNewRec
Exit Sub
If Not IsNull(Me.ItmCatagory) Then
End If
End Sub