BradCollins
Technical User
I have a combo box on my form that is a required field, what I would like to do is display a message if the user leaves it blank.
The code I have on the 'lostfocus' event is:
Whilst this seems to work ok, if the user selects something from the list and then removes it again, then you get the standard microsoft error of "you must enter a value in this field"
How can I capture that error message and only have my own show
Thanks for you advice.
The code I have on the 'lostfocus' event is:
Code:
If IsNull(Me.cmbCategory) Or Me.cmbCategory = "" Then
MsgBox "You must select a category.", vbOKOnly
Me.cmbCategory.SetFocus
Exit Sub
End If
Whilst this seems to work ok, if the user selects something from the list and then removes it again, then you get the standard microsoft error of "you must enter a value in this field"
How can I capture that error message and only have my own show
Thanks for you advice.