I am trying to set up combo boxes so that when I make a choice in the first
box, it narrows the choices that show up in the drop down box in the second
field? Anyone have any ideas - I am a novice.
PC
Allen Browne - 31 Jan 2005 02:12 GMT
See:
Limit content of combo/list boxes
at:
http://www.mvps.org/access/forms/frm0028.htm

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>I am trying to set up combo boxes so that when I make a choice in the first
> box, it narrows the choices that show up in the drop down box in the
> second
> field? Anyone have any ideas - I am a novice.
>
> PC
John Vinson - 31 Jan 2005 02:39 GMT
>I am trying to set up combo boxes so that when I make a choice in the first
>box, it narrows the choices that show up in the drop down box in the second
>field? Anyone have any ideas - I am a novice.
>
>PC
Set the COntrol Source property of the second combo to a Query which
references the first combo box. If they are named cboFirst and
cboSecond on form frmMyForm, create a Query based on the table
containing the fields you want in cboSecond; as a criterion on the
field which links the two combos put
=[Forms]![frmMyForm]![cboFirst]
with the brackets and ! marks but your own form and control name.
You need one other tweak: open the form in design view and select
cboFirst. View its Properties; select the AfterUpdate property from
the Events tab and click the ... icon. Choose Code Builder and edit it
to
Private Sub cboFirst_AfterUpdate() ' Access gives you this line
Me!cboSecond.Requery
End Sub ' and this one
John W. Vinson[MVP]