473,411 Members | 2,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

Validation based on previous records

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
Total.

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
0 1223

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Eric Linders | last post by:
Hi, I'm trying to figure out the most efficient method for taking the first character in a string (which will be a number), and use it as a variable to check to see if the other numbers in the...
5
by: Derek Cooper | last post by:
I hope you can help me. I posted this in the microsoft sql server newsgroup a few days ago and got no response so I thought I'd try here. If I can provide any clarification I'll be glad to do so....
6
by: Chuck | last post by:
A97. A database has a table: tblA which has a single text field, B. It is a primary field, indexed and no duplicates. It is used as a lookup for table tblC. A form based on tblA is used to add...
3
by: Bob Alston | last post by:
I have a routine to copy data to new versions of my app via insert into sql statements. Unfortunately, due to evolution of my app, sometimes the new version has more restrictive editing than an...
0
by: Lucky Star | last post by:
Hello All, We have the following requirement. Please send matching profiles along with the rate Expectations, Availability and Contact Details for the same. Position: Lead Validation...
27
by: Chris | last post by:
Hi, I have a form for uploading documents and inserting the data into a mysql db. I would like to validate the form. I have tried a couple of Javascript form validation functions, but it...
5
by: russell.lane | last post by:
I'm getting the much-hated "validation of viewstate MAC failed" error. This is on an ASP.Net 2.0 app running in IIS with IE 6+ as the browser. The full error text is: Validation of viewstate...
18
by: ChipR | last post by:
I have a text box with a validation rule and validation text. When entering a new record, if I put in invalid text, the validation text is displayed in a message box, but after clicking OK, another...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.