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

Validation based on previous records

P: n/a
I am using Access 2003 and I have built a simple little database to
keep track of invoices that are received at my office. I have created
a "Suppliers" table which is a list of the companies from whom I
receive invoices and I have also created an "Invoices" table to record
individual invoices. The "Invoices" table contains fields for the
Date, Supplier (referenced from the "Suppliers" table), Tax, and

I recently realized I will need a way to ensure that I'm not entering
the same invoice twice. My proposed solution is to modify the
"Invoices" table to include an "InvoiceNumber" field. This new field
will allow me to record the the supplier's invoice number as it is
printed on the invoice. This data field will be optional as not all
invoices I receive include an invoice number. I have chosen to
represent this number using a text field since each supplier's seems
to use a different scheme for numbering their invoices and it could
include the use of letters as well as numbers.

The final step would be to create some sort of validation rule to
disallow the entry of a record if it contains the same "Supplier" AND
"InvoiceNumber" data as those of a previously existing record.

I'm not sure how to create a validation rule that is dependent upon
data contained in previous records. Might anyone out there be able to
steer me in the right direction?
Mar 28 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.