Combo Box -- saving data to multiple feilds

  • Thread starter Thread starter Ofer
  • Start date Start date
O

Ofer

I have to start by saying that its the wrong way to go.
you never save a name, just incase the name will change
then you will have to update your data.
Now if you insist, you can put the field of the name as a
text box on your form, visible false, un the update event
of your quality number assign the value to that field.

me.QalityName=me.QualityNum.column(1) (or what ever)
 
Brook said:
The thing is, is that I need to save the data to my table? Why would
you suggest I don't do that?

The idea is that the only thing you need to copy to the new table is the key
field. Then you can use that to *display* any other information from the
related table without storing it again. This is done by using Lookups,
subforms, or by adding the other table to the form/report query.
 
Brook said:
Thanks Rick,

I have never used the dlookup function, can you give me an example
based on the information I provided in my post?

Actually since your ComboBox contains both values in its RowSource you don't
need to use DLookup(). Just use a TextBox with a ControlSource of...

=cboquality.Column(1)

That will display the second column from the ComboBox Rowsource for the selected
row, but it will not be saved as part of the record. If you were to change the
quality name entry later on, the new value will automatically appear when you
look at records created before you made the change.
 
Back
Top