Update form field

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

Guest

I have a form where a user enters a store number as part of data entry. I
need the form to display the store name after the user enters the store
number. Both the number and the name of each store come from a seperate
table, but the store number entered into the form needs to be updated in the
main data entry table. I don't know how to do this easily. Any help?
 
Nicholas said:
I have a form where a user enters a store number as part of data
entry. I need the form to display the store name after the user
enters the store number. Both the number and the name of each store
come from a seperate table, but the store number entered into the
form needs to be updated in the main data entry table. I don't know
how to do this easily. Any help?

Use a ComboBox for the store number and in its RowSource include both the
store number and the store name. Set the ColumnWidths to zero and some
non-zero value and set the BoundColumn property to 1. That will cause the
ComboBox to save the number while displaying the name.

If you use the Wizard to add the ComboBox to your form it will walk you
through this procedure.
 
Well, that almost worked. It did what I had before, lol.

I guess I need to explain this differently. I can get the store number, no
problem. I want to display the store name for that store. The store number
doesn't need to be tied to the store name, I just need the name to display
based off the store number.
 
Nicholas Scarpinato said:
Well, that almost worked. It did what I had before, lol.

I guess I need to explain this differently. I can get the store number, no
problem. I want to display the store name for that store. The store number
doesn't need to be tied to the store name, I just need the name to display
based off the store number.

You want to see them both after making the selection? Same as before except
reverse the column width settings so it is the second column that is hidden.
Then add a TextBox with a ControlSource of...

=ComboBoxName.Column(1)

That will display the value in the hidden second column (the store name) while
the ComboBox itself will show the number.
 
Back
Top