Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Sep 2002
    Location
    London, England
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Report disrupts modal forms? (2002)

    I have a problem and I think it is caused by a report preview messing up my modal forms. I have two forms, a booking form and a sales order and payments form. The booking form opens the sales order form modally and financial balances are updated in code attached to the Close button of the sales order form. I

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

    Re: Report disrupts modal forms? (2002)

    It doesn't work that way on my PC (Access 2002 SP-2).

    I assume that you open the Sales Order form with acDialog as WindowMode argument. You might try opening the report with acDialog as WindowMode argument too (this options is new for reports).

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Report disrupts modal forms? (2002)

    When you say "modal", do you mean modal and popup? If so, what steps are you taking to allow the report to preview? If the form is modal only, then the focus remains on the form even if the report is previewed in front of it. Is that what's happening? One possibility might be to open the report preview modally, which is possible in 2002. I believe that would prevent your form code from proceeding until the report was closed.
    Charlotte

  4. #4
    3 Star Lounger
    Join Date
    Sep 2002
    Location
    London, England
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report disrupts modal forms? (2002)

    By open modally I mean open with the WindowMode property set to acDialog in the OpenForm statement. Should I describe this as dialog mode?

    I have written a little test database with just two forms and a report, and the forms behave as expected (and as Hans suggested they would work on his system), in that the code in the first form does not start again until the form it has opened in 'dialog' mode has closed. However, in my main project, this is not happening, The calling form does not regain focus until the dialog mode form closes, but the code in the calling form starts again as soon as the report is closed, even though the dialog form is still open. Have I stumbled on a bug?

    I've tried the new dialog mode parameter in the OpenReport statement (thanks for pointing that one out) but it doesn't make any difference, the code in the calling form restarts when the report is closed, even though the form that was opened in dialog mode is still open.

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

    Re: Report disrupts modal forms? (2002)

    Opening a form with acDialog is more or less equivalent with setting Modal to Yes and Popup to Yes in the design of the form, so it is a bit more than modal.

    Try creating a new blank database and importing all database objects from your main project into it. You will have to set startup options and non-standard VBA references anew. See if the problem still occurs there.

Posting Permissions

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