linking customers and orders

Sumaping

Registered User.
Local time
Today, 17:29
Joined
May 8, 2012
Messages
12
I have a simple table of customer details and I wish to link this to a table with orders. I have linked their primary keys. I now wish to create a form to input the customer and thier order so that it all appaers on the screen at once. I have a form for inputting customers. I have another for orders. But I cannot seem to get the name of the customer in the order form, so I can relate customer to order. my products are in another table.
I have spent hours trying to get a customer and an order in the same form, but it always seems to default to separate forms.
all help apprecaited!
thanks, Sumaping
 
I have linked their primary keys.

This is your problem I believe. You should be Linking the Primary Key to a Foreign Key. Not two Primary keys together.
 
:confused: Thanks,
I had got a primary field as the foreign field in the other table. I have just spent a long time trying to get the two tables to 'relate'. It just does not seem to work. I just want the first and last name from a customer list (table) to appear on an order table so that I know who has made an order.

Can you make a table from selected bits of other tables?

Thanks
 
Can you post a Pic of your Query.

I really don't know what is going on so a Pic may help.
 
:confused: Thanks,
I had got a primary field as the foreign field in the other table. I have just spent a long time trying to get the two tables to 'relate'. It just does not seem to work. I just want the first and last name from a customer list (table) to appear on an order table so that I know who has made an order.

Can you make a table from selected bits of other tables?

Thanks

So you should have a primary key in the cust table (custID or similar).
Also a primary key in the order table (orderID or similar).

You should also have a foreign key in the order table (custID or similar). Having this foreign key in the order table allows the two tables to relate. You won't actually see the cust name in the order table only CustID. You can see the customer name related to an order in a query or on a form based on a query (using easy to create methods).

You can make tables from selected bits of other tables but you may not need to in this case, look into queries, read up on joins (required to get good results from your query).

I'm pretty new to access also so some of the more knowledgable folks may make some corrections here, hope it helps. Post back and let us know how it's going.

Chris
 
Thanks, I understand!
So really, I should not be worrying that I cannot get to see customer details with their order in table view. You suggest a query view where I could see both, I will try. What about in a form view, so you can enter the order, 'seeing' that it is going to the correct customer on the form.??
Cheers
 
Your form will be based upon the query.

So get the query right and the rest will follow.
 

Users who are viewing this thread

Back
Top Bottom