• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 380
  • Last Modified:

Access 2007 Subforms of a Main Form question

Hi ever

How can I reference fields of a subform placed on a main form.  I have a subform that loads with a Mainform that is pulling data based on a parameter of "TS" and "VAP" for type.  I have the user adding records to subform called ProductsInvoiceRec.  I have set the prperties of this subform to load on the mainform and automatically go to the next record on the form load event.  I also need two other subforms that are loaded based on a parameter of "TS" and "VAP" .  These subforms are taking the records which are TS and Vap and making Subtotals.  I need for these two forms to clear out.  In other words, I outneed all of the fields on these two subforms to clear out and make spaceseverytime a new record is added on the ProductsInvoiceRec on the Inoice Main form.

ow can I reference the invidual fields of a subform on the Load, AfterUpdate, and Before Update events in the properties of these two forms using the form preoprties?

I can't use a datasheet for this project.

1 Solution
Bill RossCommented:

In the main form you reference the form property of the control that holds the subform.

Code in main form:


Note that the me! references the main form and you can replace that globally.




Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Tackle projects and never again get stuck behind a technical roadblock.
Join Now