Combo-box dropdown? (1 Viewer)

Benny Wong

Registered User.
Local time
Yesterday, 22:37
Joined
Jun 19, 2002
Messages
65
Hello All,
I am using Access 2000. I am working on a form where
there is a bunch of combo-boxes. I am able to make one of the
combo-box to drop down in the on enter event. Here is the code
that I use to do this:

Private Sub Combo72_Enter()
Me.ActiveControl.Dropdown
End Sub

I know that I can do this for each of the combo-boxes
however, since I am learning VBA how can I do this for all of the
combo-boxes on the form? I was wondering if I could either create a procedure by listing all the combo-boxes and when the
user enter the combo-box the on_enter event will trigger the
code: Me.ActiveControl.Dropdown or do I create a function that I
could reference and be able to use it in all of my other forms?
Any advice or help is appreciated in advance. Thank you very much for your time.
 

soundsfishy

Registered User.
Local time
Today, 15:37
Joined
Sep 25, 2002
Messages
174
Try this

Me.cboName.SetFocus
Me.cboName.Dropdown
 

Users who are viewing this thread

Top Bottom