Detect click of combo-box down arrow?

M

mscertified

I have a form with lots of co-dependent combo boxes.
Certain combinations of selections are valid and some invalid.
Some of the combo boxes also have very large rowsources so I postpone
loading until the focus lands on the control.
The thing is I really don't want to trigger these things in the 'OnFocus'
event as it triggers when the user just tabs to the control they want. I
really need it to trigger on the click of the down arrow. Is there a way to
achieve this other than by overlaying a separate button over the down arrow,
 
J

Jeff Boyce

Could you use the Click event instead?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
M

mscertified

It doesn't fire when you click the down arrow. It only seems to fire when you
click on a displayed row. At the time they click the down arrow, I may not
have even loaded the rowsource yet.
 
F

fredg

I have a form with lots of co-dependent combo boxes.
Certain combinations of selections are valid and some invalid.
Some of the combo boxes also have very large rowsources so I postpone
loading until the focus lands on the control.
The thing is I really don't want to trigger these things in the 'OnFocus'
event as it triggers when the user just tabs to the control they want. I
really need it to trigger on the click of the down arrow. Is there a way to
achieve this other than by overlaying a separate button over the down arrow,

Rather than setting the combo rowsource when the user enters it, set
it from the previous combo box's AfterUpdate event.

Something like:

Me.Combo2.Rowsource = "Select YourTable.City From YourTable where
YourTable.State = " & Me.Combo1

Where the Combo1 bound column is a Prime key Number datatype.

If the bound column is a text datatype, then use:
where YourTable.State = '" & Me.Combo1 & "'"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top