Fill Subform from Parent Form

J

Jason Lopez

I am pretty sure I asked this question a long time ago. But I cannot
remember how it was done. So I have a subform where I am placing "shortcut"
buttons on the parent form. The shortcut buttons are coded to fill the
subform with the most common variations of information. But, I cannot
remember for the life of me how I code it so that the information goes to
the subform instead of the parent form. The forms are linked together via
the ID# field on both.

Jason
 
B

BruceM

I can't be sure what you mean by "I have a subform where I am placing
'shortcut' buttons on the parent form". If the question is how to reference
the subform from the main form, the syntax is:
Forms!MainFormName!SubformControlName.Form!ControlOrFieldName

In VBA this can be:
Me.SubformControlName.Form.ControlOrFieldName

To reference the main form from the subform:
Forms!MainFormName!ControlOrFieldName

In VBA:
Me.Parent.ControlOrFieldName

If you need more information it would help if you include the code you are
trying to use.
 
J

Jason Lopez

That's what I was looking for.

Thanks


BruceM said:
I can't be sure what you mean by "I have a subform where I am placing
'shortcut' buttons on the parent form". If the question is how to
reference the subform from the main form, the syntax is:
Forms!MainFormName!SubformControlName.Form!ControlOrFieldName

In VBA this can be:
Me.SubformControlName.Form.ControlOrFieldName

To reference the main form from the subform:
Forms!MainFormName!ControlOrFieldName

In VBA:
Me.Parent.ControlOrFieldName

If you need more information it would help if you include the code you are
trying to use.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top