I have the below listed code in a text box:
Private Sub TypeofSurgery_BeforeUpdate(Cancel As Integer)
Dim strMsg As String
Dim strTitle As String
Dim intStyle As Integer
If IsNull(Me.TypeofSurgery) Then
strMsg = "Pick A Value From The List Box."
strTitle = "This Is A Required Field"
intStyle = vbOKOnly
MsgBox strMsg, intStyle, strTitle
Cancel = True
End If
End Sub
The problem is when I leave the text box empty I can go on to the next
field. I do not want the box empty. I do not want to leave this text
box until a selection is made.
Any help would be appreciated.
Kenny G