dbTalk Databases Forums  

Dependent combo boxes

comp.database.ms-access comp.database.ms-access


Discuss Dependent combo boxes in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
me
 
Posts: n/a

Default Dependent combo boxes - 11-11-2004 , 08:01 AM






Looking for a way to add 4 combo boxes to a user form that select based on
the results of the previous combo box. Help ??
Please answer here in the NG.



Reply With Quote
  #2  
Old   
Ira Solomon
 
Posts: n/a

Default Re: Dependent combo boxes - 11-11-2004 , 08:57 AM






This is the very basic answer.
Assume you have 2 boxes Combo0 and Combo2.
assume Combo2 is based on a query named "emp".
Use the onchange event of Combo0.

Private Sub Combo0_Change()
If Me.Combo0 = "C01" Then
Me.Combo2.RowSource = "admin"
End If
Me.Refresh
End Sub

If "C01" is picked in Combo0, Combo2 will now be based on the query
"admin"


For four of them and for multiple values you have a lot of grunt work
to do but this is the general idea.

Good luck

Ira Solomon


On Thu, 11 Nov 2004 09:01:10 -0500, "me" <noway (AT) cox (DOT) net> wrote:

Quote:
Looking for a way to add 4 combo boxes to a user form that select based on
the results of the previous combo box. Help ??
Please answer here in the NG.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.