Just when I thought I knew what I was doing...
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.
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.