change records of form and subform

rdaughdril

New member
Local time
Today, 08:10
Joined
Dec 23, 2009
Messages
3
I have a form with a sub form that I am comparing data in each. There is too much variance for access to do so I have to do it myself.

So I look at the data in the form and if it matches with the sub form I press a button it adds data to the record on the sub form and changes to the next record of the main form.

My question is what code do I need to enter to get the sub form to change to the next record when that button is pressed.

Thanks for the help.
 
you could try something like

me.[your subform name here].refresh

in the Onclick event of the button you press
 
Tried it, nothing changed. Sorry
 
My question is what code do I need to enter to get the sub form to change to the next record when that button is pressed.
If you are wanting this from a button on the main form, you can set it:
Code:
Me.YourSubformContainerName.Form.Recordset.MoveNext
Where YourSubformContainerName is the name of the control on the main form that houses the subform, not the subform name (UNLESS the subform control and the subform are named the same thing). AND you leave the .Form. part exactly as shown as it tells Access you want a property or method on the form and not the subform control.
 

Users who are viewing this thread

Back
Top Bottom