jbpowell
asked on
Run-time error '-2147417848 (80010108)'
This one has me stumped. I get an error on the Got Focus event of a combo-box control. It only happens when the form is opened and the combo-box is then clicked before entering values in other controls. It's not a run-of-the-mill error that I can track down...very cryptic.
If I populate the form with values, and then insert those values into a table, the control operates as expected. I have no idea why this would be related, but it seems to be.
Error text
__________________________ __________ ______
Run-time error '-2147417848 (80010108)':
Automation error
The object invoked has disconnected from its clients.
__________________________ __________ ______
Sometime when I click on Debug, I'm able to step through the code without an error. Sometimes I get the same error
Sometimes Access crashes
Here's what I've done to try and resolve the error.
1. Verify that code is compiled
2. Perform Compact/Repair (twice in succession)
3. Create a new db and import all objects from original db
4. Add a reference that was in the old db and not in the new db.
5. Re-compiled code, re-compact/repair
Here are the references (in order)
Visual Basic For Applications
Microsoft Access 9.0 Obhect Library
OLE Automation
Microsoft ActiveX Data Objects 3.1 Library
Microsoft DAO 3.6 Object Library
Here is the code for the control
Private Sub cmb_find_GotFocus()
'Displays a list of inspections to find. If an inspection is in progress and incomplete, return user to the first incomplete field.
'Check to see if an inspection has not been started (ie. form is blank)
Dim v_insid
v_insid = Me.ins_id <------------------------- ---------- ---------- ---------- ----ERROR POINT
If v_insid = "" Or IsNull(v_insid) Then
GetRowSource Me.Controls(cmb_find.Name)
Exit Sub
End If
'If an inspection is in progress, check to see if it has been completed
On Error Resume Next
v_indid = ValidateDetail(Forms!inspe ction!insp ection_det ail.Form!i nd_insid.V alue)
On Error GoTo 0
If v_indid = 0 Then
GetRowSource Me.Controls(cmb_find.Name)
Else: SetFocusToResponse (v_indid)
Exit Sub
End If
End Sub
If I populate the form with values, and then insert those values into a table, the control operates as expected. I have no idea why this would be related, but it seems to be.
Error text
__________________________
Run-time error '-2147417848 (80010108)':
Automation error
The object invoked has disconnected from its clients.
__________________________
Sometime when I click on Debug, I'm able to step through the code without an error. Sometimes I get the same error
Sometimes Access crashes
Here's what I've done to try and resolve the error.
1. Verify that code is compiled
2. Perform Compact/Repair (twice in succession)
3. Create a new db and import all objects from original db
4. Add a reference that was in the old db and not in the new db.
5. Re-compiled code, re-compact/repair
Here are the references (in order)
Visual Basic For Applications
Microsoft Access 9.0 Obhect Library
OLE Automation
Microsoft ActiveX Data Objects 3.1 Library
Microsoft DAO 3.6 Object Library
Here is the code for the control
Private Sub cmb_find_GotFocus()
'Displays a list of inspections to find. If an inspection is in progress and incomplete, return user to the first incomplete field.
'Check to see if an inspection has not been started (ie. form is blank)
Dim v_insid
v_insid = Me.ins_id <-------------------------
If v_insid = "" Or IsNull(v_insid) Then
GetRowSource Me.Controls(cmb_find.Name)
Exit Sub
End If
'If an inspection is in progress, check to see if it has been completed
On Error Resume Next
v_indid = ValidateDetail(Forms!inspe
On Error GoTo 0
If v_indid = 0 Then
GetRowSource Me.Controls(cmb_find.Name)
Else: SetFocusToResponse (v_indid)
Exit Sub
End If
End Sub
try to revised references order
from
Visual Basic For Applications
Microsoft Access 9.0 Obhect Library
OLE Automation
Microsoft ActiveX Data Objects 3.1 Library
Microsoft DAO 3.6 Object Library
to
Visual Basic For Applications
Microsoft Access 9.0 Obhect Library
Microsoft DAO 3.6 Object Library
OLE Automation
Microsoft ActiveX Data Objects 3.1 Library
Tools>References
Select
Microsoft DAO 3.6 Object Library
and click UP arrow
Debug>Compile
this might be the one causing the problem
good luck
rey;-)
from
Visual Basic For Applications
Microsoft Access 9.0 Obhect Library
OLE Automation
Microsoft ActiveX Data Objects 3.1 Library
Microsoft DAO 3.6 Object Library
to
Visual Basic For Applications
Microsoft Access 9.0 Obhect Library
Microsoft DAO 3.6 Object Library
OLE Automation
Microsoft ActiveX Data Objects 3.1 Library
Tools>References
Select
Microsoft DAO 3.6 Object Library
and click UP arrow
Debug>Compile
this might be the one causing the problem
good luck
rey;-)
Is the data on the network and are you having any network issues? A bad NIC card can really goof things up.
Steve
Steve
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
it looks like u need a patch, have u got all the last SP's, MDAC etc on
if you look at this lot (plus one posted by Otacon)
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q297218
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q293631
http://support.microsoft.com/default.aspx?kbid=813120
even another company blames MS
http://www.reliasoft.com/support/rs20002.htm
if you look at this lot (plus one posted by Otacon)
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q297218
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q293631
http://support.microsoft.com/default.aspx?kbid=813120
even another company blames MS
http://www.reliasoft.com/support/rs20002.htm
sorry forgot to add to my comment "if you look at this lot"
they all refer to a patch
they all refer to a patch
ASKER
I'm accepting Mighty Silly's answer because it was the closest one to helping me figure out a solution. I followed all the links and even his suggested code change and couldn't come up with a fix. Finally after tweaking the code further, I stumbled on a work-around.
Here is the code change that results in no-errors
-----------Old code
Dim v_insid
v_insid = Me.ins_id
If v_insid = "" Or IsNull(v_insid) Then......continue code
-----------New code
If Me.ins_id.ControlSource = "" Then....continue code
For some reason, it was the reference to the unbound control's value that caused the error. Referring to the controlsource property instead results in no errors.
This still baffles me because it's not a *fix* for the original problem, just a way around it. I guess that will have to do.
Here is the code change that results in no-errors
-----------Old code
Dim v_insid
v_insid = Me.ins_id
If v_insid = "" Or IsNull(v_insid) Then......continue code
-----------New code
If Me.ins_id.ControlSource = "" Then....continue code
For some reason, it was the reference to the unbound control's value that caused the error. Referring to the controlsource property instead results in no errors.
This still baffles me because it's not a *fix* for the original problem, just a way around it. I guess that will have to do.
Ooo, in that case it shouldn't have been accepted.... you could've post on support forum and ask to have this close and points refunded.
Seriously, if none of the above helped ya, then I'm sure with a little more time, a betta solution could've been found.
I won't be offended if you go ahead w/ the points refund. I hope I (ME) don't offend you by this post either.
It's all in the spirit of finding a workable solution to your issue.
Thanks for the opportunity to help.
-Silly-
Seriously, if none of the above helped ya, then I'm sure with a little more time, a betta solution could've been found.
I won't be offended if you go ahead w/ the points refund. I hope I (ME) don't offend you by this post either.
It's all in the spirit of finding a workable solution to your issue.
Thanks for the opportunity to help.
-Silly-
ASKER
No offense taken. I see your point, your answer wasn't a quick fix, but it did get me to keep changing the code until i found a workable solution. I think that anyone who has a similar problem and reads this thread will benefit from it.
Ok,
Thanks again.
-Silly-
Thanks again.
-Silly-
http://support.microsoft.com/default.aspx?scid=kb;EN-US;271461
-0tacon-