Autoexpand combo box for text that has been updated in vb....

  • Thread starter larry c via AccessMonster.com
  • Start date
L

larry c via AccessMonster.com

If I set a combo box's value in code, how can I force the box to autoexpand?
example:
1. mycombobox has a value of 644 in its list.
2. in code, I set
mycombobox = 6
now the combo box shows a value of 6, how do I get it to auto expand to show
644, and trigger the notinlist event if that applies?

thank you

Larry
 
W

Wayne Morgan

It won't do it from code, even if you use the combo box's Text property. You
would have to have to code search the values in the Row Source and pick the
closest one itself.
 
L

larry c via AccessMonster.com

Is using sendkeys to trigger the event BAD programming?

Wayne said:
It won't do it from code, even if you use the combo box's Text property. You
would have to have to code search the values in the Row Source and pick the
closest one itself.
If I set a combo box's value in code, how can I force the box to
autoexpand?
[quoted text clipped - 9 lines]
 
W

Wayne Morgan

Send Keys has the potential to be problematic. The key strokes go to where
the focus is. If the focus should get shifted, it will cause you problems.
There may also be a workaround. See this link and the link it has for a
replacement for SendKeys.

http://www.mvps.org/access/bugs/bugs0004.htm

--
Wayne Morgan
MS Access MVP


larry c via AccessMonster.com said:
Is using sendkeys to trigger the event BAD programming?

Wayne said:
It won't do it from code, even if you use the combo box's Text property.
You
would have to have to code search the values in the Row Source and pick
the
closest one itself.
If I set a combo box's value in code, how can I force the box to
autoexpand?
[quoted text clipped - 9 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top