By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,515 Members | 1,339 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,515 IT Pros & Developers. It's quick & easy.

represnting many to many in a form

P: 1
I am making a database for my company and i cannot picture how to set it up.

I work for a medical device company and we have to keep track of what products are manufactured where. The tricky part is that a product could be made at multiple places, but also different places could make multiple products. So obviously it seems that we have a many-to-many relationship here. Even if i create a relationships form, how to i represent that in a form

What the users have requested is that in the main form, the one they will use for all the data, that when they enter in the product code that it will be able to pull up the plants that it is made in. I have no idea how to do this, weather it be with a listbox, text box with commas, or what, i have no idea.

PLEASE HELP!!
May 10 '07 #1
Share this Question
Share on Google+
1 Reply


JConsulting
Expert 100+
P: 603
I am making a database for my company and i cannot picture how to set it up.

I work for a medical device company and we have to keep track of what products are manufactured where. The tricky part is that a product could be made at multiple places, but also different places could make multiple products. So obviously it seems that we have a many-to-many relationship here. Even if i create a relationships form, how to i represent that in a form

What the users have requested is that in the main form, the one they will use for all the data, that when they enter in the product code that it will be able to pull up the plants that it is made in. I have no idea how to do this, weather it be with a listbox, text box with commas, or what, i have no idea.

PLEASE HELP!!
To begin with...you must start with a table structure that supports this kind of relationship.

In your products table, you should have a primary key defined along with all the details about your product.

In your manufacturer table..same deal. A primary key along with the details about the manufacturer.

Now you need to create another table where your Primary keys are used to represent the many to many relationships

This table will consist of a primary key, and two numeric ID fields

Now, anytime you need to pull them together, whether it be a form or a listbox or combo box, you will have the two tables on the outside, joined to their respective IDs in your "pivot" table.
J
May 10 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.