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

How to change the value on Ubound combo box?

Status
Not open for further replies.

north2060

Programmer
Apr 11, 2002
23
AU
I have an unbound combo box which on change changes other fields in the form. I am seeking your help to change the value on unbound combo box when "DoCmd.GoToRecord , , acPrevious" or "DoCmd.GoToRecord , , acNext" is used in other control. How can I do it?
 
Hi

You presumably want to change the value of the combo box to a value which is in teh recordset to which the form is bound?

Place a text box control on the form (txtDummy say) and set its visible property to false, bind it to the relevant column in the recordset

in the on current event of the form put:
MyCombo = txtDummy

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
you can dynamically change the value or even source of your cbx in this case, since you know exactly when/where you'll be requiring the changes...

i.e.

whenever you use a DoCmd.GoToRecord...
you can put:

myComboBox = "some value"

or

myComboBox.recordSource = "some SQL statement"

there's no need to create extra controls this way, but there may be extra coding needed...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top