Saleve
asked on
Can I update a recordsetclone?
I have the below code in a form's module, which seems pretty basic. But it doesn't work. I get an error message saying, "Run-time error '3020'. Update or CancelUpdate without AddNew or Edit"
Me.RecordsetClone.MoveFirs t
Me.RecordsetClone.MoveLast
Do Until Me.RecordsetClone.BOF
Me.RecordsetClone.Fields(" DtSubmitEx traHours") = Date
Me.RecordsetClone.Update
Me.RecordsetClone.MovePrev ious
Loop
Is the problem that I cannot update a recordsetclone?
If this is the case, how can I easily update a field on a continuous form for all the records that are currently displayed? If not, what is wrong?
Thank you.
Me.RecordsetClone.MoveFirs
Me.RecordsetClone.MoveLast
Do Until Me.RecordsetClone.BOF
Me.RecordsetClone.Fields("
Me.RecordsetClone.Update
Me.RecordsetClone.MovePrev
Loop
Is the problem that I cannot update a recordsetclone?
If this is the case, how can I easily update a field on a continuous form for all the records that are currently displayed? If not, what is wrong?
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
When I try with dao recordset I get the same error as before.
ASKER
Hi again, In fact, it works with the dao recordset. I forget to change the other syntax. I'll accept that solution, but do you know how it could be done with an adodb recordset?
ASKER
Dim rst As ADODB.Recordset
Set rst = Me.RecordsetClone
I get a type mismatch error