collapse combo

  • Thread starter Thread starter Tara
  • Start date Start date
T

Tara

I have a combo box used for selecting the client record the user wants to
work with. I have autoexpand set to Yes. When you begin typing, the combo
automatically drops down to make several selections visible at once. Once
the user finds the correct client and clicks on the name, the form displays
that client's data. The problem is that once the client is chosen, the combo
box remains open. I want the user to click on a client and then have the
combo collapse. How do I make that happen?

Thanks!
 
I have a combo box used for selecting the client record the user wants to
work with. I have autoexpand set to Yes. When you begin typing, the combo
automatically drops down to make several selections visible at once. Once
the user finds the correct client and clicks on the name, the form displays
that client's data. The problem is that once the client is chosen, the combo
box remains open. I want the user to click on a client and then have the
combo collapse. How do I make that happen?

Thanks!

Try putting this in the On Click event of the combobox:

SendKeys "{tab}"
 
I tried your suggestion, but I got a Run-Time error (2185). It says: You
can't reference a property or method for a control unless the control has the
focus.

I'm sure this has to do with the fact that I already have code in the
OnClick event that forces the combo to dropdown.

Do you have any other suggestions?

Thanks!
 
Back
Top