Selasa, 06 Maret 2012

RE: [MS_AccessPros] Duplicates in a field

 

Katrina-

Is Citation Number the Primary Key of the table?

In any case, you can use DLookup in the Before Update event of the field on a
form to check to see if the value already exists. It's easy to do when you're
on a new record (Me.NewRecord = True), but it's a bit more difficult to check a
change on an existing record - depending on what is the Primary Key.

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Nashua, NH)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of ka0t1c_ang3l
Sent: Tuesday, March 06, 2012 12:10 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Duplicates in a field

Hello everyone!

I'm creating a new database for our Public Safety Department. In my database I
have a Citation Number that is issued. Is there a way to code this field to
prompt me that the number entered has already been used to avoid duplicate
numbers being issued?

Any help is appreciated!

Thanks!

Katrina

------------------------------------

Yahoo! Groups Links

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar