![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I've got a command button that on rare occasions fails with "Object invalid or no longer set" I've got such a case now and in the debug window, if I type the following Me.RecordSource = "" ?me.RecordSource Me.RecordSource = strSql ?me.RecordSource SELECT * FROM qryTask ?me.RecordsetClone.eof Object invalid or no longer set because the recordsource changed, I presume the ME object is valid so it must be the recordsetClone object that isn't valid the same instance of the application worked 15 mins I wonder what could have caused the error ? the recordsource only returns 142 records |
#3
| |||
| |||
|
|
On Tue, 7 Jun 2011 14:48:04 -0700 (PDT), Roger lesperan... (AT) natpro (DOT) com> wrote: I cannot reproduce this. Perhaps you have some form of corruption. You could export your form to text using the SaveAsText method (search for it online; it is officially undocumented), followed by its cousin LoadFromText. You have already compacted the db, right? Can you repro this with a new minimal form created by the form wizard? -Tom. Microsoft Access MVP I've got a command button that on rare occasions fails with "Object invalid or no longer set" I've got such a case now and in the debug window, if I type the following Me.RecordSource = "" ?me.RecordSource Me.RecordSource = strSql ?me.RecordSource SELECT * FROM qryTask ?me.RecordsetClone.eof Object invalid or no longer set because the recordsource changed, I presume the ME object is valid so it must be the recordsetClone object that isn't valid the same instance of the application worked 15 mins I wonder what could have caused the error ? the recordsource only returns 142 records- Hide quoted text - - Show quoted text - |
#4
| |||
| |||
|
|
I've got a command button that on rare occasions fails with "Object invalid or no longer set" I've got such a case now and in the debug window, if I type the following Me.RecordSource = "" ?me.RecordSource Me.RecordSource = strSql ?me.RecordSource SELECT * FROM qryTask ?me.RecordsetClone.eof Object invalid or no longer set because the recordsource changed, I presume the ME object is valid so it must be the recordsetClone object that isn't valid the same instance of the application worked 15 mins I wonder what could have caused the error ? the recordsource only returns 142 records |
#5
| |||
| |||
|
|
I run into this also, on one system that is pretty complex. When it does happen, it is mostly under similar conditions - where I am changing a subform's recordsource via code. However, it also sometimes happens to subforms with fixed recordsource and linked to parent. The current application was recently upgraded from Access 2000 FE/BE to Access 2007 FE with SQL Server back end. The problem happens in both cases. In some cases I can confirm a loss of connection to the BE, but can not determine why. Related, I also find that when debugging code in 2007, I also get similar errors that do not occur when not debugging. There is often not way out, other than killing Access via task manager. AG Email: npATadhdataDOTcom "Roger" <lesperan... (AT) natpro (DOT) com> wrote in message news:133ca43d-9d98-4b41-b32b-cbbc828edace (AT) v12g2000vby (DOT) googlegroups.com... I've got a command button that on rare occasions fails with "Object invalid or no longer set" I've got such a case now and in the debug window, if I type the following Me.RecordSource = "" ?me.RecordSource Me.RecordSource = strSql ?me.RecordSource SELECT * FROM qryTask ?me.RecordsetClone.eof Object invalid or no longer set because the recordsource changed, I presume the ME object is valid so it must be the recordsetClone object that isn't valid the same instance of the application worked 15 mins I wonder what could have caused the error ? the recordsource only returns 142 records- Hide quoted text - - Show quoted text - |
#6
| |||
| |||
|
|
I run into this also, on one system that is pretty complex. When it does happen, it is mostly under similar conditions - where I am changing a subform's recordsource via code. However, it also sometimes happens to subforms with fixed recordsource and linked to parent. The current application was recently upgraded from Access 2000 FE/BE to Access 2007 FE with SQL Server back end. The problem happens in both cases. In some cases I can confirm a loss of connection to the BE, but can not determine why. Related, I also find that when debugging code in 2007, I also get similar errors that do not occur when not debugging. There is often not way out, other than killing Access via task manager. AG Email: npATadhdataDOTcom "Roger" <lesperan... (AT) natpro (DOT) com> wrote in message news:133ca43d-9d98-4b41-b32b-cbbc828edace (AT) v12g2000vby (DOT) googlegroups.com... I've got a command button that on rare occasions fails with "Object invalid or no longer set" I've got such a case now and in the debug window, if I type the following Me.RecordSource = "" ?me.RecordSource Me.RecordSource = strSql ?me.RecordSource SELECT * FROM qryTask ?me.RecordsetClone.eof Object invalid or no longer set because the recordsource changed, I presume the ME object is valid so it must be the recordsetClone object that isn't valid the same instance of the application worked 15 mins I wonder what could have caused the error ? the recordsource only returns 142 records- Hide quoted text - - Show quoted text - |
![]() |
| Thread Tools | |
| Display Modes | |
| |