Combo Box Query

Stemdriller

Registered User.
Local time
Today, 20:27
Joined
May 29, 2008
Messages
187
Currently whenever I want a user to select anything i simply use the [Enter Name] within the query, convert this to a form so that when the form opens, a pop up box asks the user to 'Enter Name'

Can this pop up box be changed to a Combo Box so that the user can look for 'The Name' rather than having to enter it?

Thanks
 
Yes it can, in the query crriteria put the following;
Code:
Forms!Frm_Name!ComboName

Frm_Name will be the name of the form on which your Combo resides.
ComboName will be the name of the Combo that you wish to use as criteria.

In the code under the button that fires the query you will need the following code;
Code:
If IsNull(Me.ComboName) Then
     MsgBox "Please Make a selection from the list"
     Me.ComboName.Setfocus
     Exit Sub
End If
This code will check that the user has made a selection from your Combo, if not it stops the procedure and sets the focus on the combo box.
 

Users who are viewing this thread

Back
Top Bottom