• Status: Solved
  • Priority: High
  • Security: Public
  • Views: 45
  • Last Modified:

I need to amend vba code to accept the "F4" key so a Combo Box list drops down and I can use the arrow keys

VBA ACCESS 2010

I need to amend the code below to accept the "F4" key so the Combo Box list drops down and I can use the arrow keys

Private Sub cboTask_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode

 Case vbKeyReturn, vbKeyTab, vbKeyUp, vbKeyDown
   
   KeyCode = KeyCode  'Accept these keys

  Case Else
   
   KeyCode = 0 'Block all other keys
 
 End Select

Open in new window


Thanks
fordraiders
0
Fordraiders
Asked:
Fordraiders
  • 2
1 Solution
 
Fabrice LambertFabrice LambertCommented:
Hi,

Ad vbKeyF4 to the list of accepted keys ?
Case vbKeyReturn, vbKeyTab, vbKeyUp, vbKeyDown, vbKeyF4

Open in new window

0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Why do you need code?

A Combo Box will drop down by hitting F4 or the Down Arrow key ... by default.
0
 
FordraidersAuthor Commented:
Different reasons..UnBound form and boxes..I need peoples fingers out of the data. Limit to List will not fire off when i need it to.
0
 
FordraidersAuthor Commented:
thynx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now