Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

check for Null value in combo

Status
Not open for further replies.

tekila

Programmer
Apr 18, 2002
150
SG
1. how can i check for null entry in a combo box of a data entry form so as to prompt the user to enter a value in it?

2. what about checking for any null entries in all the controls of a form?

i've tried setting the fields of the underlying table to 'Required' but i received a error message that requires me to debug 'Me.Refresh'

Private Sub Combo_AfterUpdate()

' Convert to uppercase and refresh.
Me!Combo = UCase(Me!Combo)
Me.Refresh

End Sub
 
You could try this IF Statement to check for NULL vlaues in the combo box!:

Code:
If IsNull(Me!Combo0) Then
   MsgBox "Combo is Null. Please select a value"
   Me!combo0.SetFocus
   Exit Sub 
End If

birklea birklea ~©¿©~ <><
I know what I know...don't presume that I know what I don't! Smithism!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top