Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2002

    Unanswered: pause VBA code execution. HOW?


    I have VBA code that opens a report (command button on_click event). There are several conditions that I'm checking and that open a form before opening the report.
    Can I stop the code while the form is being processed and make the code go on after that form is closed? Thanks for any help on that.
    Ali G is da best

  2. #2
    Join Date
    Nov 2002
    Maaseik, Belgium
    yes you can, it is not so difficult,

    do as follow;
    Private Sub {Command button}_Click()

    'write here youre code that has to happen before you open te form.
    DoCmd.OpenForm "{form name}", , , , , acDialog
    ' write here the code that has to happen after closing the form.

    end sub
    you only have to set your windowmode to acDialog (=3) and the code will pause until you exit the form that is open..

    hope i have helped you..


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts