Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Database Design / January 2005

Tip: Looking for answers? Try searching our database.

Access combo box design

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CCFhort - 31 Jan 2005 01:37 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
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]    
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.