Access 2007 Subforms of a Main Form question

Posted on 2012-08-11
Last Modified: 2012-08-13
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.

Question by:jjc9809
    1 Comment
    LVL 14

    Accepted Solution


    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.




    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
    Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
    In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
    In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now