Wikiposts
Search
Computer/Internet Issues & Troubleshooting Anyone with questions about the terribly complex world of computers or the internet should try here. NOT FOR REPORTING ISSUES WITH PPRuNe FORUMS! Please use the subforum "PPRuNe Problems or Queries."

MS Access query

Thread Tools
 
Search this Thread
 
Old 14th Feb 2003, 06:38
  #1 (permalink)  
Thread Starter
 
Join Date: Feb 2000
Location: asia
Posts: 542
Likes: 0
Received 0 Likes on 0 Posts
Question 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?
stickyb is offline  
Old 14th Feb 2003, 21:39
  #2 (permalink)  
 
Join Date: Feb 2000
Location: [edited by PPRuNe Admin]
Posts: 776
Likes: 0
Received 0 Likes on 0 Posts
My answer: Use Oracle.

Opps.

(make note: I hate Access as much as the Inland Revenue).
What_does_this_button_do? is offline  
Old 14th Feb 2003, 21:48
  #3 (permalink)  
Agent86
Guest
 
Posts: n/a
Cool

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
 
Old 15th Feb 2003, 07:10
  #4 (permalink)  
Thread Starter
 
Join Date: Feb 2000
Location: asia
Posts: 542
Likes: 0
Received 0 Likes on 0 Posts
Thumbs up

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.
stickyb is offline  

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service

Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.