![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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. |
#3
| |||
| |||
|
|
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/ |
#4
| |||
| |||
|
|
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/ |
#5
| |||
| |||
|
|
If I recall correctly A2003 and newer requre that the record be dirty before you can execute the code to save it |
#6
| |||
| |||
|
|
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. |
#7
| |||
| |||
|
|
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. |
![]() |
| Thread Tools | |
| Display Modes | |
| |