Form text box based on combo box

  • Thread starter Thread starter kuslusr1
  • Start date Start date
K

kuslusr1

I have a text box on a form where the control source is based on a combo box
selection "=[cboLocation].[Column](2)". The correct data will load on each
page of the form, I would like to know how to apply the data to the
"Location" table field "BelongsTo".
Please advise
 
I have a text box on a form where the control source is based on a combo box
selection "=[cboLocation].[Column](2)". The correct data will load on each
page of the form, I would like to know how to apply the data to the
"Location" table field "BelongsTo".
Please advise

You're sure you're not storing the field redundantly? What's the Recordsource
for the form, and the Control Source and Row Source for the combo box?

If you're in fact ok with storing this value, you'll need to "push" the data.
Use a textbox (named, say, txtBelongsTo) on the form with a control source of
BelongsTo, and put code in cboLocation's AfterUpdate event:

Private Sub cboLocation_AfterUpdate()
Me!txtBelongsTo = Me!cboLocation.Column(2)
End Sub
 
Back
Top