PC Review


Reply
Thread Tools Rate Thread

BeforeUpdate - on Duplicate Cancel and Goto Duplicate Record

 
 
lucy
Guest
Posts: n/a
 
      28th Mar 2006
Hi,

I have a very simple form - one table one form. In my
Form_beforeupdate I check that it is not a duplicate entry (indexing is
not working for me, even though I have a 5 field unique index, if
there's a blank field it doesn't pick up on the duplication). If it is
a duplicate entry, I use a recordsetclone to move my form bookmark to
the recordset bookmark of the duplicate record. Everything works hunky
dory, until.....BeforeUpdate gets fired through this line in one of my
subs:

If Me.Dirty then Dirty=False

As soon as I return from the BeforeUpdate event I get error 3021, no
current record. If you click End, everything continues and works as it
should. It goes to the duplicate record and does whatever that sub was
doing. I can't trap this error and I can't seem to avoid it.

If the BeforeUpdate gets fired because say the user is moving to
another record all is fine, if there's a duplicate it pops a msg and
goes to the duplicate.

Anyone have ideas as to what the problem may be?

Thanks!
Jennifer

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
if duplicate goto record deb Microsoft Access 3 11th May 2010 11:30 PM
GOTO duplicate record =?Utf-8?B?dGFua2VybWFu?= Microsoft Access 2 12th Nov 2007 03:00 AM
Check for Duplicate value BeforeUpdate sword856@yahoo.com Microsoft Access Forms 0 25th Jul 2007 10:51 PM
Stop duplicates and GoTo duplicate record =?Utf-8?B?c25lYWdsZQ==?= Microsoft Access Form Coding 2 31st May 2006 02:45 AM
How do you run a non duplicate query to find non duplicate record =?Utf-8?B?dHJhaW5lcjA3?= Microsoft Access 2 17th Mar 2006 03:07 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:02 AM.