Preventing duplicate records in a table

Joe B.

Registered User.
Local time
Today, 05:35
Joined
Mar 16, 2012
Messages
34
All,

How do I prevent duplicate entries in a table? Here is my problem. I have a table set up to maintain balances of security positions in a portfolio on a monthly basis. From the table I have created a form to allow users to enter the data. The fields are Month, Year, Asset Type, Country and Balance.

I want to prevent the users from entering the same combination of Month, Year, Asset Type, Countryand Balance. Then have an error message pop us when a duplicate combination is found

Once again, thanks for your help

Joe B
 
You could make a compound unique index of those fields.
UNique index should prevent duplicates and will give you an error message
if you try to add a duplicate (probably error 3022).

Perhaps you should show us your table set up.

Duplicates are one issue, but typos are also a real problem...
Good luck
 

Users who are viewing this thread

Back
Top Bottom