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

SENDKEYS and NUMLOCK problem 1

Status
Not open for further replies.

ormsk

Programmer
Sep 30, 2002
147
GB
MS Access 97

I have an application that populates a combo box from a SQL statement AFTER the user has made some other selections. I want the combo box to auto-matically make the selection when only one items exists. I attain this by using the SENDKEYS command. The process works ok except my number lock is switched off when using some sendkeys commands. I have tried using SENDKEYS "{NUMLOCK}" to turn the numlock back on, but without success.

Anyone have any ideas?
 
This is a well-known bug (see for marginally more info).

But dont use SendKeys at all - try this instead (example assumes your combo is called cmbDropDown and is bound to something!):

Code:
If cmbDropDown.ListCount = 1 Then cmbDropDown = cmbDropDown.ItemData(0)
[pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top