lookup tables

Mike Powell

Registered User.
Local time
Today, 16:05
Joined
Apr 18, 2001
Messages
21
I have a list of customer names, and part numbers. In my table I can lookup the customer’s name, and the part number automatically. Can I limit the lookup table to show only the part numbers relevant to each customer?

Mike
 
You do have two tables, right? The Parts table has the CustomerID as the Foreign Key? If this is your setup then selecting a CustomerID in the parts table will show you all of their parts.

If you do not have two tables then you need to create one and normalize your customer table.

hth,
Jack
 
Lookup

Hey Jack How are you ?. No I have one table, Field 1 is Customer, field 2 is Part Number, and 3 is description.
If I select "Ford" as my customer, I want only the Ford part numbers allowed in my Part Number filed lookup. Does this make sense ?

Mike
 
I am doin' dandy Mike and I hope you are doing the same...

You can create a query and select the CustomerName in the criteria and that way you will only see to part numbers for that customer. I am not sure exactly what you are trying to do so if you will give a few more details and just what you want to do I will try and assist.

Here is one solution: Create a combo box showing only the CustomerName. Place this on a form. Add a subform based on your table. Set the MasterLink to the Combo box and the ChildLink to CustomerName and selecting a customer form the combo box should show you all the part numbers that belong to that name in the subform

I can say that I would probably have set up up two tables thusly:

tblCustomers
CustomerID (PK and autonumber)
LastName
FirstName
...other fields...

tblParts
PartsID (PK and autonumer)
CustomerID (FK and long integer)
PartNumber
PartDescription

Do what works best for you, but the setup above is probably a little more flexible.

hth,
Jack
 

Users who are viewing this thread

Back
Top Bottom