Suppose I have a table with Field1, Field2 and …Field5. I want to give the first record the values of the second record for all fields. The following works
Dim db as DAO.database, RST as dao.recordset
Dim S1$,S2$,S3$,S4$,S5$
Set db = currentdb
Set rst = db.openrecordset(“MyTable”,dbopendynaset)
Rst.movefirst
Rst.movenext
S1$ = rst!Field1
S2$ = rst!Field2
S3$ = rst!Field3
S4$ = rst!Field4
S5$ = rst!Field5
Rst.moveprevious
Rst.edit
Rst!Field1 = s1$
Rst!Field2 = s2$
Rst!Field3 = s3$
Rst!Field4 = s4$
Rst!Field5 = s5$
Rst.update
My question is, is there a shorter more direct way to do it?
Thanks in advance