ineedyourhelp
MIS
I have a required field that if left blank, I would like a message box to appear that informs the user that the field is required. The code (that I have posted below) works, but not with my particular field which happens to be a combo box.
Is there a way to make this message box appear when the combo box field is left blank and user either tries to exit or proceed to the next field? Basically, I do not want the user to be able to move anywhere until the field has been populated.
I have tried the code in the field's Lost Focus and Exit Procedures and in the Form's Exit Procedure, but it still will not work.
Any ideas would be appreciated.
SEE CODE BELOW...
Private Sub Application_LostFocus()
If IsNull(Me.Application) Then
MsgBox "You must enter an application name"
End If
End Sub
Is there a way to make this message box appear when the combo box field is left blank and user either tries to exit or proceed to the next field? Basically, I do not want the user to be able to move anywhere until the field has been populated.
I have tried the code in the field's Lost Focus and Exit Procedures and in the Form's Exit Procedure, but it still will not work.
Any ideas would be appreciated.
SEE CODE BELOW...
Private Sub Application_LostFocus()
If IsNull(Me.Application) Then
MsgBox "You must enter an application name"
End If
End Sub