Link to home
Start Free TrialLog in
Avatar of Will Schmidt
Will SchmidtFlag for United States of America

asked on

Creating a unique field in Access

I am building a database in ACCESS and have created a field called "Computer ID".  I want this field to be unique.  How do I set it up so that duplicate entries cannot be added?
Avatar of OMC2000
OMC2000
Flag of Russian Federation image

you could set it in field settings, you should set this field as indexed and require "duplicates are not allowed"
If you want Access to automatically assign the value, set it to Autonumber, and then set the duplicate setting as above.

You can also set it as the Primary Key of the table, which will set it to be unique as well.
Avatar of Will Schmidt

ASKER

OK, that works OK except I would like to customize it in the form. on the "error now" pic is what comes up when I try to enter a name that is already there. the second pic is what I would like it to look like.
Form-2.jpg
Error-now.PNG
ASKER CERTIFIED SOLUTION
Avatar of OMC2000
OMC2000
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for helping me with this issue.  The problem has been resolved.
Are you sure you intended to accept only that comment as your solution? The first two comments should have given you an answer to your question, and the last would have been an answer to your followup question.