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

How to set combo box to specific value

Status
Not open for further replies.

PL01

Technical User
Jun 9, 2008
57
US
...anybody know the VBA code to set a combo box on a form to a specific value contained in its record source? I tried Forms!Tablet.Combo91.Value = Fvar where Fvar is a field in the record but no luck. And why won't Me!Combo91.SetFocus put the cursor in the combo box after the code is run?
 
Setting the value of the combo box shouldn't be difficult. You must know which column is bound so you set the proper value. Most of the time the bound column might not be displayed. Can you share your entire code so we have a better understanding of when and how you call it? Is the combo box bound?

Duane
Hook'D on Access
MS Access MVP
 
Thanks, you got it, bound column was wrong...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top