Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Apr 2001
    Posts
    122
    Thanks
    7
    Thanked 0 Times in 0 Posts

    How to wait for a command to finish (2000)

    I need to run a report based on data in a temporary table several times changing the data in the temporary table each time. How can I wait for the report to complete before starting to rebuild the temporary table? I use the DoCmd.OpenReport command after creating the table in a VB function. After each report, I change a selection criteria then rebuild the temporary table.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How to wait for a command to finish (2000)

    You could declare a variable Public blnReportFinished As Boolean in a standard module.
    Before opening the report, set blnReportFinished = False, and in the On Close event of the report, set blnReportFinished = True.
    Check blnReportFinished to test if you can rebuild the table; you could use the On Timer event of a form for this.

  3. #3
    2 Star Lounger
    Join Date
    Apr 2001
    Posts
    122
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Re: How to wait for a command to finish (2000)

    Thanks - tha solved the problem.

Posting Permissions

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