ComboBox On Click Event (1 Viewer)

Shep

Shep
Local time
Yesterday, 19:31
Joined
Dec 5, 2000
Messages
364
I am not able to get a ComboBox to drop down on the On Click event...that is, unless I drop it down and "click" one of the choices in it. Then it runs the code in the On Click event.

Does anyone know how to write a procedure that will dropdown a ComboBox with a single click?

I've seen VB applications which do this. In the past, I have given up and used the On Focus event as a substitute.

Thanks
 

tanalee

Registered User.
Local time
Today, 01:31
Joined
Apr 25, 2002
Messages
10
Aloha...

I don't have Access available at the moment to experiment.

May I ask what is special about On Click? How about On Enter?

What is the code you are trying to use?

Tana
 

Alexandre

Registered User.
Local time
Today, 07:31
Joined
Feb 22, 2001
Messages
794
As you have experiences, the OnClick events for a combo is triggered once the user selected an item with the mouse. you should try the MouseDown event
 

Shep

Shep
Local time
Yesterday, 19:31
Joined
Dec 5, 2000
Messages
364
heh...

On Enter sounds good
Mouse Down sounds good

I'm not firing on all cylinders today, I think.

Thanks, you two.
 

DW

Registered User.
Local time
Today, 01:31
Joined
May 25, 2002
Messages
58
I use this with my combo's

Private Sub EnquiryCode_GotFocus()
If IsNull([EnquiryCode]) Then
[EnquiryCode].Dropdown
End If
End Sub

EnquiryCode is the name of the combo. What happens is when the cursor lands in the combo, it drops down if their is nothing selected.
When the user re-enters the combo and something HAS been selected, it doesn't drop down.
If the user needs to change the selection, just press F4.

I hope this is what you were after.

Dave
 

Users who are viewing this thread

Top Bottom