UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
2 Pages V < 1 2  (Go to first unread post)
   Reply to this topicStart new topic
> Duplicates Removal Code, Access 2013    
 
   
SomekindaVB
post Dec 20 2017, 12:09 AM
Post#21



Posts: 179
Joined: 15-December 16



Thanks for the fast response,

However, this is still throwing an error message on update

I've never seen an error not suppress by docmd.setwarnings false before

and just As I've got it mostly working!
Go to the top of the page
 
merlenicholson
post Dec 20 2017, 12:09 AM
Post#22



Posts: 518
Joined: 23-November 11
From: Tampa, Florida, USA - UTC -5:00


Joe, I like your Delete query in your posted example. It's a variation on the Select query that the Access wizard creates for you, and I've tried many times to wrap a Delete query around it failing every time. So I learned something myself. Thanks

--------------------
Merle Nicholson
Ninety percent of all mental errors are in your head. - Yogi Berra -
Go to the top of the page
 
merlenicholson
post Dec 20 2017, 12:12 AM
Post#23



Posts: 518
Joined: 23-November 11
From: Tampa, Florida, USA - UTC -5:00


The On Error Resume Next should take care of it. I'd look at the database settings on error handling. Somethings not set right.

--------------------
Merle Nicholson
Ninety percent of all mental errors are in your head. - Yogi Berra -
Go to the top of the page
 
SomekindaVB
post Dec 20 2017, 12:17 AM
Post#24



Posts: 179
Joined: 15-December 16



Well, you suggested the idea and I did it. it would be freaking perfect if on error ... do stuff worked. So i'm a bit confused becuase ive done this before a few times and it works well. Just this on is funky.

Is there a place in the db that defines settings for such things?

Thanks again for your time and help
Go to the top of the page
 
merlenicholson
post Dec 20 2017, 12:31 AM
Post#25



Posts: 518
Joined: 23-November 11
From: Tampa, Florida, USA - UTC -5:00


Ok, my fault. The line
CODE
If Err.Number <> 3022 then

Should be
CODE
If (Err.Number <> 3022) And (Err.Number <> 0 )  then

--------------------
Merle Nicholson
Ninety percent of all mental errors are in your head. - Yogi Berra -
Go to the top of the page
 
SomekindaVB
post Dec 20 2017, 06:01 PM
Post#26



Posts: 179
Joined: 15-December 16



No, not your fault, becuase this comes after .update. The error occurs on the update, so this code can only trigger if on error resume next worked.

UNfortunately, resume next is failing. It's bizarre. never see that happen before.

CODE
On Error Resume Next 'this must work here
.Update 'this produces the error msgbox
If (Err.Number <> 3022) And (Err.Number <> 0 )  then ' which should then  give this the ability to work


I might gotta give up on it, and settle for what I have which is what you gave me before, and it's working perfectly.
Go to the top of the page
 
SomekindaVB
post Dec 20 2017, 06:32 PM
Post#27



Posts: 179
Joined: 15-December 16



No, not your fault, becuase this comes after .update. The error occurs on the update, so this code can only trigger if on error resume next worked.

UNfortunately, resume next is failing. It's bizarre. never see that happen before.

CODE
On Error Resume Next 'this must work here
.Update 'this produces the error msgbox
If (Err.Number <> 3022) And (Err.Number <> 0 )  then ' which should then  give this the ability to work


I might gotta give up on it, and settle for what I have which is what you gave me before, and it's working perfectly.
Go to the top of the page
 
2 Pages V < 1 2


Custom Search
RSSSearch   Top   Lo-Fi    19th January 2018 - 02:42 AM