Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Customer's Event Handler error

Status
Not open for further replies.

dgriffin

Programmer
May 26, 2001
50
0
0
US
Just when I thought I knew what I was doing...[blush]

I am recieving the error "Customer's event handler called a non-reentrant method in the provider." on the red line below when I change a QTY field in the DataGrid:

===========================================================
Private Sub DataGrid_AfterUpdate()
Dim dblTotal As Double, rstClone As ADODB.Recordset

rstNew!Exten = rstNew!Qty * rstNew!Cost
rstNew.Update
Set rstClone = rstNew.Clone
rstClone.MoveFirst
dblTotal = 0
Do While Not rstClone.EOF
dblTotal = dblTotal + (rstClone!Qty * rstClone!Cost)
rstClone.MoveNext
Loop
Total = Format(dblTotal, "$###,###.00")
Set rstClone = Nothing

End Sub
==========================================================

rstNew is opened as PUBLIC in another Sub:

==========================================================
Set conNew = New ADODB.Connection
conNew.CursorLocation = adUseClient
conNew.Open "Provider=Microsoft.Jet.OLEDB.4.0;Password=;Persist Security Info=True;Data Source=" & iniListPath & "Lists.mdb"
Set rstNew = New ADODB.Recordset
Set rstNew.ActiveConnection = conNew
rstNew.CursorType = adOpenStatic
rstNew.Open "Select * From Personnel ORDER BY Name", conNew, adOpenStatic, adLockReadOnly
==========================================================

What do I need to do to either make the rstClone legitimate or find a way to update the Total textbox.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top