I have a form call [Calculate Gross Pay] which record source is a query call [Gross pay].
Also there is a form call [Payroll] which fields are bound to a table called [payroll].
There are several records on the form[Calculate Gross Pay] and I need all records to be stored in the fields on the form [Payroll].
When I run the macro to populate the records, only the first record is displayed on the [Payroll] form. How to repeat the macro until all records are copied?
This is the Macro I am using:
OpenQuery Gross Pay, Datasheet, Edit
OpenForm Calculate Gross Pay, Datasheet, ,,Edit, Normal
OpenForm Payroll, Datasheet, , , Edit, Normal
SetValue [Forms]![Payroll]![PCdate], [Forms]![Calculate Gross Pay]![PayRegDate]
SetValue [Forms]![Payroll]![PCEmp], [Forms]![Calculate Gross Pay]![PrEmpName]
SetValue [Forms]![Payroll]![ PCNISB], [Forms]![Calculate Gross Pay]![ nisb]
SetValue [Forms]![Payroll]![PCNISD], [Forms]![Calculate Gross Pay]![ NISD]
SetValue [Forms]![Payroll]![PCpaye], [Forms]![Calculate Gross Pay]![ PAYE]
GoToRecord Form, Calculate Gross Pay, Next,