Hi,
I am trying to use the following code to alert users that a field was left blank. I would like the shift field completed before closing the form or moving on to a new record.
I have tried placing the code in various events procedures, but it is just not working.
[BEGIN CODE]
Private Sub Shift_LostFocus()
Dim Title As String
Title = "Shift Field"
If Me![fsd_shift] = "" Then
Beep
MsgBox "Please select a Shift from the items lilsted.", vbOKOnly, Title
Me![fsd_shift].SetFocus
End If
End Sub
[END CODE]
Much appreciated.
I am trying to use the following code to alert users that a field was left blank. I would like the shift field completed before closing the form or moving on to a new record.
I have tried placing the code in various events procedures, but it is just not working.
[BEGIN CODE]
Private Sub Shift_LostFocus()
Dim Title As String
Title = "Shift Field"
If Me![fsd_shift] = "" Then
Beep
MsgBox "Please select a Shift from the items lilsted.", vbOKOnly, Title
Me![fsd_shift].SetFocus
End If
End Sub
[END CODE]
Much appreciated.