locked
Web Database - Refresh Form from Another Form RRS feed

  • Question

  • I have a web database developed with Access 2010 and Access Services.  The database is published to SharePoint.  I have a form (frmContacts) with a button that opens a popup form (frmCompanies) that I am using to update a field in a table using a data macro.  After the data is updated I want to refresh the main form (frmContacts) form from a macro in the popup form (frmCompanies).  Is this possible?  Is it possible to refresh the form frmContacts automatically after the data macro runs?  Thanks for your assistance?


    Weste

    Tuesday, January 15, 2013 12:51 AM

Answers

  • Hi Weste,

    Welcome to the MSDN forum.

    Please refer to the following solution.

    1. Create the tables for tbContacts and tbCompanies.

    <tfoot></tfoot>
    tbContacts
    ID Person CompanyID
    1 Yoyo Jiang 1
    2 Lucy Jiang 2
    3 Lily Wu 1

    <tfoot></tfoot>
    tbCompanies
    ID CompanyName
    1 CompanyA
    2 CompanyB
    3 CompanyC
    4 CompanyD

    2. Create tow forms based on the tables in step1 respectively. Name these forms as "frmContacts" and "frmCompanies" respectively.

    3. Add a button onto the frmContacts, and add its click event's logic as follow:

    Please notice that in the SetProperty action, there is a "=" symbol before "TempVars!tempCompanyID" in the Value.

    4. In OnCurrent event of the frmCompanies, add the following logic:


    Please refer to the demo database from this link: http://sdrv.ms/10g5mcv 

    Have a nice day.


    Yoyo Jiang[MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Weste Thursday, January 17, 2013 1:43 PM
    Thursday, January 17, 2013 12:15 PM

All replies

  • Hi Weste,

    Welcome to the MSDN forum.

    Please refer to the following solution.

    1. Create the tables for tbContacts and tbCompanies.

    <tfoot></tfoot>
    tbContacts
    ID Person CompanyID
    1 Yoyo Jiang 1
    2 Lucy Jiang 2
    3 Lily Wu 1

    <tfoot></tfoot>
    tbCompanies
    ID CompanyName
    1 CompanyA
    2 CompanyB
    3 CompanyC
    4 CompanyD

    2. Create tow forms based on the tables in step1 respectively. Name these forms as "frmContacts" and "frmCompanies" respectively.

    3. Add a button onto the frmContacts, and add its click event's logic as follow:

    Please notice that in the SetProperty action, there is a "=" symbol before "TempVars!tempCompanyID" in the Value.

    4. In OnCurrent event of the frmCompanies, add the following logic:


    Please refer to the demo database from this link: http://sdrv.ms/10g5mcv 

    Have a nice day.


    Yoyo Jiang[MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Weste Thursday, January 17, 2013 1:43 PM
    Thursday, January 17, 2013 12:15 PM
  • Thank you for the great example!

    Weste

    Thursday, January 17, 2013 1:43 PM
  • You're welcome. I'm glad it could help.

    Yoyo Jiang[MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, January 18, 2013 2:15 AM