Group:  Microsoft Access ยป microsoft.public.access.forms
Thread: Combo box - 1st record selection

Combo box - 1st record selection
Glynn 1/1/2009 4:28:01 AM
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.
--
Glynn
Re: Combo box - 1st record selection
"Ken Snell \(MVP\)" <kthsneisllis9[ at ]ncoomcastt.renaetl> 1/1/2009 4:46:09 AM
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

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


"Glynn" <Glynn[ at ]discussions.microsoft.com> wrote in message
news:9A93B3ED-41B3-4EB3-98D6-DC0DA2D2FAFE[ at ]microsoft.com...
[Quoted Text]
>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.
> --
> Glynn


Home | Search | Terms | Imprint
Newsgroups Reader