MS Access query
Thread Starter
Join Date: Feb 2000
Location: asia
Posts: 542
Likes: 0
Received 0 Likes
on
0 Posts
MS Access query
I would be eternally thankful if someone comes up with a way to do this.
In Access, using a combo box on a form, is there a way to programmatically open the drop down list when the combo box gets the focus, without the user having to click on the little arrow at the side of the combo box?
In Access, using a combo box on a form, is there a way to programmatically open the drop down list when the combo box gets the focus, without the user having to click on the little arrow at the side of the combo box?
Guest
Posts: n/a
An easy one...
From design view
select the combo box you want to set this action to.
In the Properties select the Event tab and click in the
On Got Focus line.
Click on the Build button (the 3 dot button on the right of the line)
select Code builder
The VB code class module will open
Between these 2 lines
Private Sub Selectbase_GotFocus()
End Sub
add this code SendKeys "%{down}"
so you end up with
Private Sub Selectbase_GotFocus()
SendKeys "%{down}"
End Sub
Save your form
Now when you click or tab into the combo box the list will automatically display.
MAx
From design view
select the combo box you want to set this action to.
In the Properties select the Event tab and click in the
On Got Focus line.
Click on the Build button (the 3 dot button on the right of the line)
select Code builder
The VB code class module will open
Between these 2 lines
Private Sub Selectbase_GotFocus()
End Sub
add this code SendKeys "%{down}"
so you end up with
Private Sub Selectbase_GotFocus()
SendKeys "%{down}"
End Sub
Save your form
Now when you click or tab into the combo box the list will automatically display.
MAx
Thread Starter
Join Date: Feb 2000
Location: asia
Posts: 542
Likes: 0
Received 0 Likes
on
0 Posts
Agent86, Thanks so much, I was well aware of event procedures, use them a lot, bur hadn't thought of send keys and there was nothing in the MS help stuff or examples.
WDTBD - don't be so grumpy old man, sometimes we are constrained by what we have to work with.
WDTBD - don't be so grumpy old man, sometimes we are constrained by what we have to work with.