[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

not allow duplicate serial numbers to be scanned into form

Posted on 2011-03-04
4
Medium Priority
?
468 Views
Last Modified: 2012-05-11
Hello have attached sample db.
if you open db- open form- you will see serial number- i want users not to be able to add the same serial number more than once.
If I make serial number primary key in table- I get message box saying- 'you can't go to that specific record' - is that how I should do it? ( and then can I change message?)
or in this database should I be not allowing duplicate serial numbers in some other way?
thank you
onedb.mdb
0
Comment
Question by:davetough
  • 2
  • 2
4 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 2000 total points
ID: 35039803
You can make a Unique Index for SSN and use the Auto Number for the Primary Key.

See image ... and modified db.

mx
onedb.zip
Capture1.gif
0
 

Author Comment

by:davetough
ID: 35039936
thank you - i am going to have to look at this to understand-
i am not sure how you created the window ( indexes: tbl1) - maybe I have to just look at it more
thank you
0
 

Author Comment

by:davetough
ID: 35040001
just found in design view of table under view menu-thanks - i have some things to learn
0
 
LVL 75
ID: 35040211
Sorry ... was about to post that and got a phone call.

fyi ... you can use this window to create unique Compound Indexes one two or more fields - to make a unique combination of fields - should the need arise ...

mx
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question