Full Version: Ensuring No Duplicate Records
UtterAccess Forums > Microsoft® Access > Access Forms
FlySpy
Hi All,
need a little assistance...
In South Africa our identification numbers are 13 digits - and obviously no two id numbers are the same... I need to ensure that when the id number is typed in the form... that there is no duplicate id number in the entire table...
I have been struggling for days on this... and have got to the point where I need assistance before my poor computer takes the brunt of my frustration and stupidity...
Thanking you in advance...
Cheers,
Gavin
theDBguy
Hi Gavin,
You could go to your table's Design View and while the ID number is selected, set the Indexed property to "Yes (No Duplicates)."
Hope that helps...
FlySpy
Hi DBguy,
That makes logical sense... but is there a code that I can write to make it search multile taples, example: tblFullStaff, tblPartStaff, tblFullStudents, tblPartTimeStudents...
Your assistance is appreciated.
Cheers,
Gavin
theDBguy
Hi Gavin,
Why would you need to search multiple tables? If you are using the ID number as a foreign key, then they are supposed to be stored in the related tables. I guess I don't understand your setup.
However, there is a demo in the Code Archive by Candace Tripp called "Universal Search" that can search all fields and all tables within the database for a string or text.
Just my 2 cents...
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.