Combo box - 1st record selection

G

Glynn

I have a combo box to select the records to appear in a Form.

Upon opening the Form, the 1st record is automatically selected - whereas I
want the form to open in blank - and a record to appear only after the user
selects the record in the Combo Box.

Appreciate help.
 
K

Ken Snell \(MVP\)

Add a WHERE clause to the form's RecordSource query:

WHERE FieldName = Forms!NameOfForm!NameOfComboBox


Then, use the AfterUpdate event of the combo box to requery the form:

Private Sub NameOfComboBox_AfterUpdate()
Me.Requery
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top