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

Require Input for Unbound Combo Box

Status
Not open for further replies.

cpsqlrwn

IS-IT--Management
Jul 13, 2006
106
US
I have an unbound combo box being used to pull information from a query onto a form. I have limited the field to the values in the list, but I am interested in generating a message if the field is left blank. All of the other controls in this form are locked and disabled as this form provides information only. The cursor leaves this control and immediately moves to a subform.
 
Do you use a button to open the query? If so I'd put a MsgBox in the OnClick for the button.

MsgBox("You must select one of the choices")

Laurie Hamlin
 
This is on a form which is pulling data from a query based on the input in the combo box. The form loads and the combo box is the first control.
 

So... you open the form and it is completely blank until something is entered in the combo box?

In the form's Open event, include a message box that instructs the user to select an item from the combo box.


Randy
 
The problem is that the field can be left blank and does not produce an error. That is what I am trying to address.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top