Opening a form from VBA code and pausing

Posted on 2011-05-12
Last Modified: 2012-05-11
When clicking a command button on Form1 I am excuting vba code which opens Form2.  I would like to halt the excution of the lines of code following the OpenForm command until an action is taken on Form2 and it is closed.  What is the best way to do this?
Question by:dsoderstrom
    LVL 77

    Expert Comment

    Use the acDialog option in the DoCmd.Openform statement.
    LVL 10

    Accepted Solution

    You can also set the modal proerty of the form to Yes.

    Author Closing Comment

    That was the solution I needed.  Thanks for the help

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
    In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
    In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    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

    21 Experts available now in Live!

    Get 1:1 Help Now