Macro in Access 2007 to setvalues on a from with values from another form

By betmck ·
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 do I repeat the Macro until all the records are read?

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,

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Share your knowledge

Related Discussions

Related Forums