Question transferring data between tables?

turnej

New member
Local time
Today, 04:07
Joined
Dec 3, 2011
Messages
6
Hi

I am very new to access so apologies if this is very simple but I have created a database with 3 tables customers, products and orders, I have created a one to many relationship between customers and orders and want users to input using a form, so I have created a customer form and want to add a form operation button so that once a customer has been set up they data input can be moved to the order input form but I want it to carry the primary key from customers (customer id) as a foreign key in the order table and I have created that relationship but when I open the order form it does not pre populate the customer id, can I make it do this to prevent orphan orders if the person inputting forgets or puts the wrong customer id in etc?
 
I would suggest a better approach, have the main form with the customer details on it, and on that form have a subform window which contains a form for entering the orders information.
MS Access comes with a demo database called “Northwind” this has exactly what you are looking for, you would do well to study the code in this demo database as I’m sure it will be of interest to you. You may also like to watch this video http://msaccesshintsandtips.ning.com/profiles/blogs/948619:BlogPost:21 which points out a particular problem with the northwind database.
 

Users who are viewing this thread

Back
Top Bottom