Solved

not allow duplicate serial numbers to be scanned into form

Posted on 2011-03-04
4
409 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 - Access MVP) earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
just found in design view of table under view menu-thanks - i have some things to learn
0
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now