Validation Table

  • Thread starter Thread starter Mark H
  • Start date Start date
M

Mark H

I have two Tables:
1) Parts Table - Contains a Unique Part Number and the description that goes
with it
2) MRP Table - Contains Part Number, Description, Qty, Customer Number and
Date

When Data is entered into MRP Table, I don't want the user to be able to
enter fake Part Numbers. How do I make a rule that goes back to the part
table to make sure the part is real

Thanks in advance for your help,
Mark
 
First, the MRP table should not have the part Description field.
The Description is already stored in the Parts table, so storing
it here is redundant.

Second, you should have a relationship established between the
two tables based on PartNumber (assuming that's the PK of the
Parts table), then in a form (not in a table) you would use, for
example, a combo box to allow the user to select a valid part
number from the Parts table.
 
I have two Tables:
1) Parts Table - Contains a Unique Part Number and the description that goes
with it
2) MRP Table - Contains Part Number, Description, Qty, Customer Number and
Date

When Data is entered into MRP Table, I don't want the user to be able to
enter fake Part Numbers. How do I make a rule that goes back to the part
table to make sure the part is real

Thanks in advance for your help,
Mark

Open the Relationships window. Add the two tables, and drag the Part Number
from the Parts table to the Part Number in the MRP table. Check the "Enforce
Referential Integrity" checkbox.

You should also *REMOVE* the description from the MRP table. It's redundant;
it should exist only in the parts table.

If you have users are entering data directly in to your tables... DON'T.
Tables are not ideal for data interaction. Use a Form instead; on the form you
can use a Combo Box to let the user select a valid part number from the table,
rather than having them type it in (and slapping their hand if they make a
mistake).

You might want to look at some of these resources, especially the tutorials at
the end:

Jeff Conrad's resources page:
http://www.accessmvp.com/JConrad/accessjunkie/resources.html

The Access Web resources page:
http://www.mvps.org/access/resources/index.html

Roger Carlson's tutorials, samples and tips:
http://www.rogersaccesslibrary.com/

A free tutorial written by Crystal:
http://allenbrowne.com/casu-22.html

A video how-to series by Crystal:
http://www.YouTube.com/user/LearnAccessByCrystal

MVP Allen Browne's tutorials:
http://allenbrowne.com/links.html#Tutorials
 
Mark H said:
I have two Tables:
1) Parts Table - Contains a Unique Part Number and the description that
goes
with it
2) MRP Table - Contains Part Number, Description, Qty, Customer Number and
Date

When Data is entered into MRP Table, I don't want the user to be able to
enter fake Part Numbers. How do I make a rule that goes back to the part
table to make sure the part is real

Thanks in advance for your help,
Mark
 
Back
Top