HELP: Duplicate Keys in Access Database 
Author Message
 HELP: Duplicate Keys in Access Database

using VB5

How can i check for duplicate keys without getting "No Current Record"
error, when I add or edit. I use a data control.

I've tried all kinds of methods to get around this problem.

The file is Access, table type recordset, must have index on the file.
where can i check for duplicates - currently have check in validate
event when updating. Sample code would be GREATLY APPRECIATED.

                                          THANK YOU



Fri, 21 Jul 2000 03:00:00 GMT  
 HELP: Duplicate Keys in Access Database

Quote:

> using VB5

> How can i check for duplicate keys without getting "No Current Record"
> error, when I add or edit. I use a data control.
> The file is Access, table type recordset, must have index on the file.
> where can i check for duplicates - currently have check in validate
> event when updating. Sample code would be GREATLY APPRECIATED.

>                                           THANK YOU

  recaptbl.Seek "=", c$, f$, nrdate
  DoEvents
  If recaptbl.NoMatch = True Then
    'add record code
  Else
    MsgBox "(addnewrecap) Recap has been found for this trade"
  End If

Or maybe I do not understand the question.

--
Ka M Sa Hob Ne Da
Jerry Bradford
Independence, Missouri

http:\\www.qni.com\~jbrad



Fri, 21 Jul 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. HELP: Duplicate keys in Access Database

2. VB & Access: duplicate inserts on unique key

3. Need Help with Duplicate Key Error

4. Help with record locking - duplicate key problem...

5. I am getting duplicate records, I mean everything is duplicate even Access record number

6. VB error trapping of duplicates in indexed Access database

7. Duplicating a Table in an Access Database

8. Duplicating a Table in a Access Database

9. Database Tables Disappearing - HELP HELP - Need Access Database specs

10. trap "duplicate key" errors

11. Duplicate Value in primary key - problem

12. Duplicate Value in Index/Primary Key Error

 

 
Powered by phpBB® Forum Software