Append data to modal form.

Posted on 2007-10-02
Last Modified: 2008-03-21
I open a modal form to populate a field in another form.  It works well.  I want to go backwards and append the data in the field in the main form to the field for the modal form.  How do I?
Question by:JimFaull
    LVL 10

    Expert Comment

    On the modal form, you can reference the main form something like this:
    me.SomeField.Value = forms!frmMainform.SomeField.Value
    LVL 119

    Accepted Solution

    use the openargs

    from main form
    docmd.openform "modalform",openargs:=me.fieldName

    in the load event of modalform

    private sub modalform_load()
    if len(me.openargs)>0 then


    end if

    end sub

    or you can use
    if not isnull(me.openargs) then


    end if

    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    In the previous article, Using a Critera Form to Filter Records (, the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
    Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
    Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
    In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

    754 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

    16 Experts available now in Live!

    Get 1:1 Help Now