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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I tell if the dropdown list for a combobox is being displayed?

Status
Not open for further replies.

RichW1215

Programmer
Dec 6, 2011
3
US
I'm using Access 2003 but I'll be moving to 2010 soon.
In VBA, how can I tell if the dropdown list of a combobox is currently being displayed? I want to use the KeyPress or KeyDown events of the combobox to do 1 thing if the dropdown is being displayed and something else if it isn't being displayed.

Any ideas how to accomplish this?

Rich
 
How are ya RichW1215 . . .

There's no property in access that provides [blue]the state of the dropdown list[/blue]. Perhaps if you tell us what you want to do on [blue]keyPress/KeyDown[/blue] (dending on the dropdown state), we may be able to help you ...

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Ok.

I have a form with a flex grid on it. I use a subform to edit the data contained in each cell. There is a combobox on the subform that is used to select a value.

In the KeyPress / KeyDown events of the combobox on the subform I capture the key pressed by the user. If the user clicks the Tab key then I move the user to the next column to the right in the grid. (Shift Tab goes to the left.) I also capture the Up Arrow and Down Arrow in order to move up and down in the grid. This works fine if the dropdown list isn't currently being displayed. If the dropdown list IS being displayed then the up arrow and down arrow move up and down in the grid. This is not what I want - if the dropdown is being displayed I want to move up and down in the dropdown list (not move up and down in the grid).

So, I would like to act differently depending on whether or not the dropdown list is currrently displayed. If I can't find a solution then I'll probably have to not allow the user to move up and down in the grid using the arrow keys.

That's it! :)
 
The second method listed on that page did NOT work. However, the first method works like a champ! Thank you very much!

Rich
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top