-----Original Message-----
Sounds like you are using the EditMode property improperly!
Perhaps you are trying to change the editmode property.
You can't do that. Or maybe you're using the editmode
property on an object that does not have such a property.
But really it's impossible to say because you didn't give
the code snippet which troubles you so, therefore those of
us which are not omniscient can at best guess.
Thank you for your response. I hope the following will
help.
I am using Microsoft Access 2000 (9.0.2720).
I would like to update a field in a query.
Here is my code:
Function CalcOrderCumTotal()
Dim db As DAO.Database
Dim rst As Recordset
Dim mPONO As String
Dim mPOCUMQTY As Integer
Set db = CurrentDb()
Set rst = dbOpenRecordset("qryOrders", dbOpenDynaset)
With rst
rst.MoveFirst
mPONO = PONO
mPOCUMQTY = 0
rst.MoveNext
Do Until rst.EOF
If PONO = mPONO Then
rst.EditMode
POCUMQTY = mPOCUMQTY + POQTY
rst.Update
Else
rst.EditMode
POCUMQTY = POQTY
rst.Update
mPOCUMQTY = 0
mPONO = PONO
End IF
rst.MoveNext
Loop
Close
End With
End Function