auto fill field in a table by filling one field in list box

  • Thread starter Thread starter Jeffrey Reed
  • Start date Start date
J

Jeffrey Reed

I have a two tables; users_table and orders_table.

users_table has the following colums: userid, username.

orders_table has the following colums: orderid, userid,
username.

orders_table has a list box that displays the name field
from the users_table. i want my query to fill in the
userid field from the users_table when i select the
username field in the drop down list box in the
orders_table.

Is it possible to create a query that will perform the
described functionality? If so, how can this be done?
 
I have a two tables; users_table and orders_table.

users_table has the following colums: userid, username.

orders_table has the following colums: orderid, userid,
username.

Why?

Storing the username redundantly in the Orders table wastes space and
gives you major headaches if a person changes their name. You'ld need
to track down every order they've made and update the name field.

Just store the UserID in the Orders table. If you need to see the
name, use a combo box bound to the UserID with the Name as the first
visible field (you don't usually need to see the ID on your forms at
all).
 
Back
Top