Sadie Hewgill
Registered User.
- Local time
- Today, 04:49
- Joined
- Oct 18, 2010
- Messages
- 52
My database has a table called part numbers with a list of all part numbers, as well as the type of part. The part number is the primary key and should only correspond to one part. Then I have two (and eventually there will be more) tables that contain information for each part type. One is called Fasteners_mm, and the other Machined Parts. The part number is how these tables relate to the Part Numbers table. I have attached a picture of the relationships. There is another table, Part Type, which is just a lookup list of the different types of parts (Machined Parts and Fasteners_mm). I am not sure if I will keep it, so far it doesn't seem to be helping at all.
So my problem is that I want to prevent the same part number from being entered in both fasteners_mm and machined Parts. My form set up doesn't allow for this, but if someone were to edit the tables, there is nothing stopping them from changing the part type in the Part Numbers table so that it doesn't correspond to the right type in either of the other two tables. They can also go and enter a part number in fasteners_mm that is already in use in Machined Parts. How do I stop this?
So my problem is that I want to prevent the same part number from being entered in both fasteners_mm and machined Parts. My form set up doesn't allow for this, but if someone were to edit the tables, there is nothing stopping them from changing the part type in the Part Numbers table so that it doesn't correspond to the right type in either of the other two tables. They can also go and enter a part number in fasteners_mm that is already in use in Machined Parts. How do I stop this?