Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

One To Many

Status
Not open for further replies.

RabSwinney

Technical User
Aug 21, 2002
25
0
0
FI
I have two tables in my database, one for customer details and one for products, when entering data into a form I have the customer data then a subform with users entering products. When I am in the query I want to copy and paste some rows of data then change a few details, the problem is when I copy and paste not all the data getes pasted?

Any Ideas?
 
First, you have a table with customers and a table with products. Let me ask you, can one customer buy alot of products? AND can one product be bought by alot of customers? If both answers are YES, then you have a many-to-many relationship and must create a third table (called a junction table) which, at minimun has the primary keys of the other two tables. Also, any common fields between the two tables would go in this table, such as quantity, order date, price. So you would have created two one-to-many relationships. Read various articles on relating tables.
Next you say that when you are in a query, you want to copy and paste rows of data. That just doesn't make sense. Maybe you meant when you are in a TABLE.
To copy rows, you click on the square next to a record, hold down your shift key, click in the square next to the last record you want to copy. The WHOLE row should be highlighted. Then right click, paste. Go to the other table, and on the last row, click next to the square so the WHOLE row is highlighted and paste.
But it sounds like you have to redesign your tables. Here are the basic steps:
Normalize the tables
Set up the relationships, maybe use the relationship window
Create the proper joins in the queries.
If all that sounds like a foreign language, break out the books and take some intro classes. Access is quite difficult to learn on your own.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top