dbTalk Databases Forums  

Error 2759 saving record Access 2010

comp.databases.ms-access comp.databases.ms-access


Discuss Error 2759 saving record Access 2010 in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bob Darlington
 
Posts: n/a

Default Error 2759 saving record Access 2010 - 03-31-2011 , 01:40 AM






I'm using Access 2010 to open an Access 2002 mdb front end linked to an
Access 2002 backend.
I have the following code in the AfterUpdate event on a control to force the
record to be saved before proceeding.

DoCmd.RunCommand acCmdSaveRecord

When it encounters this line, I get the following error:
'The method you tried to invoke on an object failed.' (Error 2759).
The same thing happens if I use Me.Dirty = False

But the record gets saved anyway.
All references are in tact.

If I test the same frontend mdb on another PC using Access 2002 and linked
via the LAN to the same data file, I don't get the message.
Any ideas out there.

--
Bob Darlington
Brisbane

Reply With Quote
  #2  
Old   
Tony Toews
 
Posts: n/a

Default Re: Error 2759 saving record Access 2010 - 03-31-2011 , 04:55 PM






On Thu, 31 Mar 2011 16:40:19 +1000, "Bob Darlington"
<bob (AT) notheredpcman (DOT) com.au> wrote:

Quote:
I'm using Access 2010 to open an Access 2002 mdb front end linked to an
Access 2002 backend.
I have the following code in the AfterUpdate event on a control to force the
record to be saved before proceeding.

DoCmd.RunCommand acCmdSaveRecord

When it encounters this line, I get the following error:
'The method you tried to invoke on an object failed.' (Error 2759).
The same thing happens if I use Me.Dirty = False

But the record gets saved anyway.
All references are in tact.

If I test the same frontend mdb on another PC using Access 2002 and linked
via the LAN to the same data file, I don't get the message.
Any ideas out there.
If I recall correctly A2003 and newer requre that the record be dirty
before you can execute the code to save it. So check to see if the
record is dirty before saving it.

If me.dirty = true then _
DoCmd.RunCommand acCmdSaveRecord

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
  #3  
Old   
Bob Darlington
 
Posts: n/a

Default Re: Error 2759 saving record Access 2010 - 03-31-2011 , 05:46 PM



Thanks Tony. I tried your suggestion but still the same message.


--
Bob Darlington
Brisbane
"Tony Toews" <ttoews (AT) telusplanet (DOT) net> wrote

Quote:
On Thu, 31 Mar 2011 16:40:19 +1000, "Bob Darlington"
bob (AT) notheredpcman (DOT) com.au> wrote:

I'm using Access 2010 to open an Access 2002 mdb front end linked to an
Access 2002 backend.
I have the following code in the AfterUpdate event on a control to force
the
record to be saved before proceeding.

DoCmd.RunCommand acCmdSaveRecord

When it encounters this line, I get the following error:
'The method you tried to invoke on an object failed.' (Error 2759).
The same thing happens if I use Me.Dirty = False

But the record gets saved anyway.
All references are in tact.

If I test the same frontend mdb on another PC using Access 2002 and linked
via the LAN to the same data file, I don't get the message.
Any ideas out there.

If I recall correctly A2003 and newer requre that the record be dirty
before you can execute the code to save it. So check to see if the
record is dirty before saving it.

If me.dirty = true then _
DoCmd.RunCommand acCmdSaveRecord

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
  #4  
Old   
Bob Darlington
 
Posts: n/a

Default Re: Error 2759 saving record Access 2010 - 03-31-2011 , 06:25 PM



"Tony Toews" <ttoews (AT) telusplanet (DOT) net> wrote

Quote:
On Thu, 31 Mar 2011 16:40:19 +1000, "Bob Darlington"
bob (AT) notheredpcman (DOT) com.au> wrote:

I'm using Access 2010 to open an Access 2002 mdb front end linked to an
Access 2002 backend.
I have the following code in the AfterUpdate event on a control to force
the
record to be saved before proceeding.

DoCmd.RunCommand acCmdSaveRecord

When it encounters this line, I get the following error:
'The method you tried to invoke on an object failed.' (Error 2759).
The same thing happens if I use Me.Dirty = False

But the record gets saved anyway.
All references are in tact.

If I test the same frontend mdb on another PC using Access 2002 and linked
via the LAN to the same data file, I don't get the message.
Any ideas out there.

If I recall correctly A2003 and newer requre that the record be dirty
before you can execute the code to save it. So check to see if the
record is dirty before saving it.

If me.dirty = true then _
DoCmd.RunCommand acCmdSaveRecord

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
Tony
Further to my earlier reply, I've tried the following as a workaround in the
error code and it seems to work OK:

'ErrorShopNum_AfterUpdate:
If Err = 2759 And Me.Dirty Then 'Error occurring on acCmdSaverecord in
Access 2010 - this appears to solve problem
vCount = vCount + 1
If vCount = 0 Then DoCmd.RunCommand acCmdSaveRecord 'Only retry once
Resume Next
End If'

Also, the problem didn't occur under Access 2003 or 2002 testing.

BUT. I'm still concerned that things which worked under previous versions
are not working in 2010.
My application contains 227 forms and testing every function on every form
for every possible scenario would seriously affect my golfing schedule.

--
Bob Darlington
Brisbane

Reply With Quote
  #5  
Old   
David-W-Fenton
 
Posts: n/a

Default Re: Error 2759 saving record Access 2010 - 04-01-2011 , 02:56 PM



Tony Toews <ttoews (AT) telusplanet (DOT) net> wrote in
news:70u9p6h146h652306in803nfdfgfqq2p1g (AT) 4ax (DOT) com:

Quote:
If I recall correctly A2003 and newer requre that the record be
dirty before you can execute the code to save it
No, that is not true.

--
David W. Fenton http://www.dfenton.com/
contact via website only http://www.dfenton.com/DFA/

Reply With Quote
  #6  
Old   
Tony Toews
 
Posts: n/a

Default Re: Error 2759 saving record Access 2010 - 04-03-2011 , 11:31 PM



On 1 Apr 2011 19:56:54 GMT, "David-W-Fenton"
<NoEmail (AT) SeeSignature (DOT) invalid> wrote:

Quote:
If I recall correctly A2003 and newer requre that the record be
dirty before you can execute the code to save it

No, that is not true.
I'll be darned. You're right.

I am positive, and obviously wrong, that I came across this somewhere,
somewhen.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/

Reply With Quote
  #7  
Old   
David-W-Fenton
 
Posts: n/a

Default Re: Error 2759 saving record Access 2010 - 04-06-2011 , 12:10 PM



Tony Toews <ttoews (AT) telusplanet (DOT) net> wrote in
news:8biip6dupsu6p1rft0d18dsvd80qe17d8r (AT) 4ax (DOT) com:

Quote:
On 1 Apr 2011 19:56:54 GMT, "David-W-Fenton"
NoEmail (AT) SeeSignature (DOT) invalid> wrote:

If I recall correctly A2003 and newer requre that the record be
dirty before you can execute the code to save it

No, that is not true.

I'll be darned. You're right.

I am positive, and obviously wrong, that I came across this
somewhere, somewhen.
I am well aware that it's not the case, because two of my main
ongoing (and long-lived) projects use replicated back ends. Before
Jet 4, a save would increment the generation field for the record,
even if the record had not been saved, and this could cause an
unchanged record to produce a conflict with the same record in a
different replica that had a real change. If the "fake" change
record were saved more times than the real change, with Jet 3.5, the
fake change would win and the real change would lose (because
conflict resolution in Jet 3.5 was based on the full record and the
winner of a conflict was the record with the most changes; Jet 4
changed to field-by-field conflict resolution, so that problem went
away).

Anyway, my point is that unnecessary saves could cause problems
(i.e., DATA LOSS) in replicated apps with Jet 3.5, so I was always
careful to never save a record unless the record was actually dirty.
I knew perfectly well that doing so without the check would save the
record, anyway, which was why I always checked first.

--
David W. Fenton http://www.dfenton.com/
contact via website only http://www.dfenton.com/DFA/

Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.