Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

auto appear combo box

Status
Not open for further replies.

vangx222

Technical User
Jun 6, 2007
36
US
I'm not sure if this is even possible in Access, you can obviously tell that I'm a new user to Access, but here's my question...

I have a combo box 1 with a list of choices
let's say:

Blue
Green
Red
Purple

are my choices

What I want to happen is when I choose a certain choice in combo box 1, have another combo box 2 appear with more choices.

Example, when I choose Blue in combo box 1, automatically another combo box 2 would appear with a list of choices.

BUT I don't want the combo box 2 showing on the form AT ALL if I chosed Red as my hcoice in combo box 1. Meaning, Blue would be the only choice in combo box 1 that has other subcategories and combo box 2 only appears when Blue is chosen otherwise it stays hidden.

Does this make sense? Is this possible? If so can someone help me?

THANK YOU!
 
yep, there's 2 ways, you can use code (my prefered way) or you can try to do it directly through the form properties (will be more difficult to manage later on)

through code, put a if statement in the AfterUpdate event of your combo1 and modify the visible property of combo2 accordingly.

if you don't want to use code, then you can try to put formulas into the visible property of combo2 which reference combo1 and returns a boolean result.

--------------------
Procrastinate Now!
 
In the AfterUpdate event procedure of the combo1 and in the Current event procedure of the form:
Me![combo 2].Visible = (Me![combo 1] = "Blue")

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thank you Crowley16, PHV, and Remou for your help!!

It works!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top