Updating Text Boxes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to make a selection from a combo box and the selected value must
update the necessary text field on the form. The Tradewind example (FORMS -
Orders) does just that. A selection is made in the “Bill To†with the address
being immediately updates. What triggers this update (NOT THE SHIP TO) of
address on selection?
Thanks for the help
 
Hi,
Without having access to that sample, I would guess your code would go in the AfterUpdate event
of your combo.
 
The "Ship to" fields are triggered by the Afterupdate event. I just cannot
see how the data is updatd in the Bill to section.
Sorry you dont have the Tradewind example found in office 2000.
 
Hi,
There is code behind the AfterUpdate event, that's how it's done.
Here is the code:
Private Sub CustomerID_AfterUpdate()
' Update ShipTo controls based on value selected in CustomerID combo box.
Me!ShipName = Me![CustomerID].Column(1)
Me!ShipAddress = Me!Address
Me!ShipCity = Me!City
Me!ShipRegion = Me!Region
Me!ShipPostalCode = Me!PostalCode
Me!ShipCountry = Me!Country

End Sub
 
Thanks for the code. I still have a question unanswered
(so I think)
I placed a break point in the afterupdate and watched the
data change in the "ship to" part of the form as I single
step. Before the program gets to this point however,the
address details are already updated once the selection is
made at the combo box (Bill to). How does Address, City,
Region, Postal Code etc get updated automatically?
Thanks again
 
Back
Top