Loop through records

Yippiekaiaii

Registered User.
Local time
Today, 20:41
Joined
Mar 25, 2013
Messages
21
I have a subform for which I want to loop through all the records and then copy one of the fields for each row into another sub form.


I came up with the bellow code but i get an error when I run it.

The error is an "error 438".

Can anyone see why?

Code is at follows and I am copying the field called price:


Do Until Forms![Roll Out - Site Form]![Roll Out - Sign items pick list].EOF

[Roll Out - Sign items added].Form![Price] = [Roll Out - Sign items pick list].Form![Price]

Forms![Roll Out - Site Form]![Roll Out - Sign items pick list].MoveNext

Loop
 
The code is used by a Recordset object, not for a Form object.
 
Forms don't store records. Tables store records. If you want to loop through a recordset, use ADO or DAO or simply run a query that selects records from tblA and appends them to tblB. Do not attempt to automate a form.

Thank you for the reply.

How would i go about doing that? Its not something i have done before
 

Users who are viewing this thread

Back
Top Bottom