Synch combo & text box

teiben

Registered User.
Local time
Today, 01:35
Joined
Jun 20, 2002
Messages
462
I can't see to get a combo box to refresh the contents of a textbox. Depending on the value selected in the combo box one of 4 different textboxes get populated, via if statement, with a value from another field. It works fine except if the user goes back and changes the value of the combo box. I've played around with the refresh in the combo box afterupdate event and it errors. Any idea on how to solve this issue? (using 97)
 
you are going to have to give us a bit more info. There are many ways to update data from selecting a combo box. Are you using the value in the combo box to dynamicly filter a query which supplies data to the main form?

eg: [Forms]![frm_YourForm]![cbo_YourComboBoxValue]

Or are you storing the value of the combo box in a field within the form and then refreshing the form based on that value? Using a AfterUpdate event?

If the update event and refresh should happen after the user updates the combo box, then that is where you should run your update event. So if the user changes it, it will update.
Where are you running your IIf statment? Is it on the form? Or the event on the combo box?
 
No I'm not using value in the combo box to dynamicly filter a query.

The fields are cboplant, txttotalcost, txttotalcostMI, txttotalcostCH. Form is based on a table.

combobox uses an if statement; if cboplant = mi then txttotalcost (default 0) then txtboxMI = txttotalcostMI; if plant = CH then txttotalcostCH = txttotalcostCH,etc.

Hopefully this clarifies.
 

Users who are viewing this thread

Back
Top Bottom