Brad Ashforth
2007-10-22 20:16:02 UTC
We have suddently started getting this error. We have the following code
snippet:
grd.Col = 1: grd.Text = rs.Fields("WR_VesselID").Value
grd.Col = 2: grd.Text = Trim(cboVessel.Text)
grd.Col = 3: grd.Text =
Format(NVL(rs.Fields("WR_SumInsured").Value, 0), "#0.00000")
grd.Col = 4: grd.Text = rs.Fields("WR_WarRiskZone").Value
grd.Col = 5: grd.Text = NVL(rs.Fields("WR_DateIn").Value, "")
grd.Col = 6: grd.Text = NVL(rs.Fields("WR_TimeIn").Value, "")
grd.Col = 7: grd.Text = NVL(rs.Fields("WR_DateOut").Value, "")
grd.Col = 8: grd.Text = NVL(rs.Fields("WR_TimeIn").Value, "")
grd.Col = 9: grd.Text = NVL(rs.Fields("WR_Rate").Value, "0.00000")
grd.Col = 10: grd.Text = NVL(rs.Fields("WR_Debit").Value,
"0.00000")
grd.Col = 11: grd.Text = NVL(rs.Fields("WR_Discount").Value,
"0.00000")
grd.Col = 12: grd.Text = NVL(rs.Fields("WR_Credit").Value,
"0.00000")
grd.Col = 13: grd.Text = NVL(rs.Fields("WR_Net").Value, "0.00000")
grd.Col = 14: grd.Text = IIf(NVL(rs.Fields("WR_Paid").Value, 0)
<> 0, "Yes", "No")
Stepping through the code, we will get a few lines in and then it will fail
with the msg "the object invoked has disconnected from one of its clients".
The rs object uses ADO and on the failed row I can hover over the
rs.fields(<colname>).value and it will correctly display what I'd expect to
see. Similarlly I can check it's value in the immediate window without error.
But it will fail when trying to set grd.text the value. I did an internet
search for "the object invoked has disconnected from" and found several posts
on the subject, none seem to apply. The form in question DOES use a date/time
picker and I had seen a post blaming mscal.ocx and when checked I did find
that the mscal.ocx in my Office10 folder WAS newer ... but it made no
difference. Please help if you can ... Thank you in advance.
snippet:
grd.Col = 1: grd.Text = rs.Fields("WR_VesselID").Value
grd.Col = 2: grd.Text = Trim(cboVessel.Text)
grd.Col = 3: grd.Text =
Format(NVL(rs.Fields("WR_SumInsured").Value, 0), "#0.00000")
grd.Col = 4: grd.Text = rs.Fields("WR_WarRiskZone").Value
grd.Col = 5: grd.Text = NVL(rs.Fields("WR_DateIn").Value, "")
grd.Col = 6: grd.Text = NVL(rs.Fields("WR_TimeIn").Value, "")
grd.Col = 7: grd.Text = NVL(rs.Fields("WR_DateOut").Value, "")
grd.Col = 8: grd.Text = NVL(rs.Fields("WR_TimeIn").Value, "")
grd.Col = 9: grd.Text = NVL(rs.Fields("WR_Rate").Value, "0.00000")
grd.Col = 10: grd.Text = NVL(rs.Fields("WR_Debit").Value,
"0.00000")
grd.Col = 11: grd.Text = NVL(rs.Fields("WR_Discount").Value,
"0.00000")
grd.Col = 12: grd.Text = NVL(rs.Fields("WR_Credit").Value,
"0.00000")
grd.Col = 13: grd.Text = NVL(rs.Fields("WR_Net").Value, "0.00000")
grd.Col = 14: grd.Text = IIf(NVL(rs.Fields("WR_Paid").Value, 0)
<> 0, "Yes", "No")
Stepping through the code, we will get a few lines in and then it will fail
with the msg "the object invoked has disconnected from one of its clients".
The rs object uses ADO and on the failed row I can hover over the
rs.fields(<colname>).value and it will correctly display what I'd expect to
see. Similarlly I can check it's value in the immediate window without error.
But it will fail when trying to set grd.text the value. I did an internet
search for "the object invoked has disconnected from" and found several posts
on the subject, none seem to apply. The form in question DOES use a date/time
picker and I had seen a post blaming mscal.ocx and when checked I did find
that the mscal.ocx in my Office10 folder WAS newer ... but it made no
difference. Please help if you can ... Thank you in advance.
--
Brad Ashforth
Brad Ashforth