I looked online and tried several different options.
I am looking to have a message pop up when an entry is not completed.
The following code seems to work well but I keep getting the message box twice. I understand it seems to be firing twice but not sure what part of the code is causing this.
#Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me.cboProject) Then
MsgBox "The Project Must be entered" & vbCrLf & _
"Please select from the drop down box.", _
vbCritical, _
"Canceling Update"
DoCmd.CancelEvent
Me.cboProject.SetFocus
End If
End With
End Sub#
I am looking to have a message pop up when an entry is not completed.
The following code seems to work well but I keep getting the message box twice. I understand it seems to be firing twice but not sure what part of the code is causing this.
#Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull(Me.cboProject) Then
MsgBox "The Project Must be entered" & vbCrLf & _
"Please select from the drop down box.", _
vbCritical, _
"Canceling Update"
DoCmd.CancelEvent
Me.cboProject.SetFocus
End If
End With
End Sub#