Combo Box

D

Duane

Is it possible to create a combo box that will query 4 fields of a table the
database is linked to and then insert the data into like fields in a
different table?

I created a comb box that queries the number, lastname, lock, and unit of a
linked table. I have all the properties set so you can see all four columns
in the box. number is a unique field and I can type the number in the box
and the corresponding name, lock, and unit are visible. I would then like
to have the information inserted into like fields in another table.

Can anyone help me with this? If there is a better way to achieve this, I
would be most interested in hearing about it. I am all for learning more
stuff :).

Thanks very much..
 
J

John Vinson

Is it possible to create a combo box that will query 4 fields of a table the
database is linked to and then insert the data into like fields in a
different table?

It is. But this is a bad idea and improper design.
I created a comb box that queries the number, lastname, lock, and unit of a
linked table. I have all the properties set so you can see all four columns
in the box. number is a unique field and I can type the number in the box
and the corresponding name, lock, and unit are visible. I would then like
to have the information inserted into like fields in another table.

No. You DON'T want to store the lastname, lock and unit redundantly in
a second table. That's not how databases work! Not only does it waste
space, but it risks your having a Number in one table with one
lastname in that table and a *DIFFERENT* lastname in the other table.
You store the unique ID *and only the unique ID*. You can create a
Query joining the two tables to display the information in the first
table in association with that in the second table.

You can *display* the last name, lock and unit information on a Form
by putting textboxes on the form with control sources such as

=comboboxname.Column(2)

to show the third column (the property is zero based); but the
information should not be actually stored.

John W. Vinson[MVP]
 
Top