View Single Post
  #5  
Old October 23rd, 2008, 08:27 PM posted to microsoft.public.access.tablesdbdesign
Gus
external usenet poster
 
Posts: 69
Default Access 2000 Duplicate Key

Since you haven't said what KIND of errors or what you've fixed, I cannot
advise - but Access 2000 does indeed handle unique indexes correctly.


The problems that I fixed where problably due to database corruption, so I
recreated my table.

Yes. For user friendliness, you might want to use the BeforeUpdate event of
the textbox bound to FS_Agr_Num on the form; use DLookUp to see if the user's
entry already exists and cancel the addition with a warning message if so.


Great I will do and see if this works. Any suggestions as to the DLookup
code structure?

Thanks.

"John W. Vinson" wrote:

On Thu, 23 Oct 2008 10:44:07 -0700, Gus wrote:

The FS_Agr_Num is normally entered by two users who make the most updates to
the table tblAgr_Check_Out, however any user can add an FS_Agr_Num if they
find that it is not currently in the table. The problem is that I am trying
to have the database not allow an FS_Agr_Num more then once. Would you say
that making the FS_Agr_Num required, Indexed and not allow duplicates would
be one of my best solutions?


Yes. For user friendliness, you might want to use the BeforeUpdate event of
the textbox bound to FS_Agr_Num on the form; use DLookUp to see if the user's
entry already exists and cancel the addition with a warning message if so.

As mentioned I did try this before and it gave me many errors. I corrected
that and the Database seems to be working fine as I have not gotten
complaints from my users. Though now I am afraid that if I modify the table
structure I may run into corruption problems. What do you suggest.


Since you haven't said what KIND of errors or what you've fixed, I cannot
advise - but Access 2000 does indeed handle unique indexes correctly.
--

John W. Vinson [MVP]