Solved

not allow duplicate serial numbers to be scanned into form

Posted on 2011-03-04
4
433 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
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
type of query 11 40
zero pad a access form field 2 14
vba sql wild card passing in code 3 20
Cascading Combo boxes between 2 sub navigation forms 1 9
In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
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 retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

815 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