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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem getting combo box to require user input

Status
Not open for further replies.

newcoder54

Technical User
Jul 2, 2002
46
0
0
US
I have a combo box on a form. When the form opens, Set Focus is on the box. I want to require the user to select a name from the drop down or not be able to go to other boxes if they do not. Ideaa please. Not seeing what I need from older tips so far.
Thanks
 
In the Exit event procedure of the combo, either this:
If Me![name of combo].ListIndex = -1 Then
Cancel = True
End If
Or this:
If IsNull(Me![name of combo]) Then
Cancel = True
End If

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top