Linking an ID number to the name???

Switchwork

Registered User.
Local time
Today, 07:16
Joined
Dec 1, 2003
Messages
81
I have been doing this database thing for just over a year now and I still have lots to learn. The problem I have at the moment is this: I have a customer field and customer ID field and when i designed it I thought that when I entered the customer ID number into a field it will automatically come up with the Customer name it identifies. Does this actually happen or have I been led down the garden path???

See on the form I enter my data into I enter in the Customer ID and Customer Name should I be doing this??? Or only enter the Customer ID?? I really don't know what it is I am doing wrong if this actually works. Does it???

Please let me know about this or is it a load of rubbish?? I also have a question on combo boxes and list boxes. I wanted to begin to enter a name and it come up with data that begins with that letter or something so I can select it instead of entering each name each and every time. When I did try one of these boxes I am not sure which one it was. When I selected the one I wanted to enter on the rest of the pages of the form the same Customer name was on all of them. I decided that it wasn't worth it and scrapped the idea. Any idea what I did wrong?? Did I use the wrong box or something.???
 
Please let me know about this or is it a load of rubbish??
Since you've been at this for a year now it is time to learn how to create queries. The CustomerName should exist ONLY in the Customer table. The primary key of the customer table should be a CustomerID. The CustomerID is placed in the Order table to link an order to a particular customer. There is NO need to also include the CustomerName in the Order table. All you need to do to have Customer information available on the Order form is to create a query that joins the Order table to the Customer table. You can select columns from both tables. Use this query as the recordSource for the Order form. When you enter a CustomerID, either by typing or selecting from a combo, and tab out of the field, the rest of the customer fields will populate as if by magic!
 

Users who are viewing this thread

Back
Top Bottom