The purpose of my code is to update the records that follow the edited one in a continuous form, but I could not make it work.
Here is the code simplified:
-----------------------------------------------------
Private Sub Adjust_AfterUpdate()
Dim rst As Recordset
Dim n as Interger
set rst = Me.RecordsetClone
' set n = the value just entered
n = Adjust
' update the following records with the same value
Do While Not rst.EOF
rst.MoveNext
Adjust = n
rst.Update, True
Loop
End Sub
------------------------------------------------------
I am using Access 97
References include:
Visual Basic For Applications
Ms Access 8.0 Object Library
OLE Automation
Ms DAO 3.6 Object Library
*In Windows 2000 with Access 2000 installed too.
Thanks for any help and advice.
Peter
Here is the code simplified:
-----------------------------------------------------
Private Sub Adjust_AfterUpdate()
Dim rst As Recordset
Dim n as Interger
set rst = Me.RecordsetClone
' set n = the value just entered
n = Adjust
' update the following records with the same value
Do While Not rst.EOF
rst.MoveNext
Adjust = n
rst.Update, True
Loop
End Sub
------------------------------------------------------
I am using Access 97
References include:
Visual Basic For Applications
Ms Access 8.0 Object Library
OLE Automation
Ms DAO 3.6 Object Library
*In Windows 2000 with Access 2000 installed too.
Thanks for any help and advice.
Peter