Updating table from TextBox

  • Thread starter Thread starter Sharon
  • Start date Start date
S

Sharon

Hopefully this question will be clear. I have created a
form that uses a combo box to choose a state & then a
text box on that same form gets auto-populated with a
Region #... which works great (thanks to help from
mvps.org). However, I would also like to populate my
table with that Region Code. But, since the control (the
place I usually put the info) is set to
=cboWorkState.Column(2) [to pull in the Region #], I can't
figure out how to put that value in the underlying table.
Can someone please assist me?

Thanks so much!
Sharon
 
Sharon said:
Hopefully this question will be clear. I have created a
form that uses a combo box to choose a state & then a
text box on that same form gets auto-populated with a
Region #... which works great (thanks to help from
mvps.org). However, I would also like to populate my
table with that Region Code. But, since the control (the
place I usually put the info) is set to
=cboWorkState.Column(2) [to pull in the Region #], I can't
figure out how to put that value in the underlying table.
Can someone please assist me?

Change the ControlSource of the TextBox to the field name you want the value stored
in. Then use code in the AfterUpdate event of the ComboBox to "push" the third
column value into the TextBox.

Me![Region Code] = Me!cboWorkState.Column(2)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top