1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

VBA Access a report window dont stay as dialog window

Discussion in 'Software Development' started by zdenek, Sep 5, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. zdenek

    zdenek Thread Starter

    Joined:
    Sep 5, 2011
    Messages:
    5
    Hi guys I have strange problem when I open a window as a dialog and from this window want to open report as well as dialog but the report opens as a form type and under the first window, which is not good to me I need to see the report dialog window as first. Do you have any idea??
    The code I am opening the report window is
    DoCmd.OpenReport "SC_Cd", acViewReport, , , , acDialog

    Thank you very much :)
     
  2. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    6,560
    First Name:
    Hans
    Hi welcome to the forum,
    I'm not sure I understand but if it is the quetsion of foucs on the report or the userform (dialog) there is a setiing to the user form modal settings.
    Something to do with focus or so.
     
  3. zdenek

    zdenek Thread Starter

    Joined:
    Sep 5, 2011
    Messages:
    5
    Well so I will explain it this way... Lets say you have a Main form with a button. When you click the button it will open a form with this command
    DoCmd.OpenForm "ExampleWindow", acNormal, , , , acDialog
    so it opens a window as a dialog so its overlapping the mainwindow ok?

    Now on this ExampleWindow is again a button with this command
    DoCmd.OpenReport "Report window", acViewReport, , , , acDialog

    and when you click it it should open again a Report window as a dialog that is overlapping the ExampleWindow BUT here is the problem,
    when it opens its behing all of them....

    Any idea???
     
  4. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    6,560
    First Name:
    Hans
    I imagine that there must be an option to set the form at topmoost or similar.
    It must be somewhere in commands properties, An extra parameter in DoCmd.OpenREpoirt ,,,,, ?
    Onlien help en syntax for this command/
     
  5. zdenek

    zdenek Thread Starter

    Joined:
    Sep 5, 2011
    Messages:
    5
    I would also imagine that there should be some cmd for that or just option but did not find anything as well as on net... Just cant find a solution :-(
     
  6. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    6,560
    First Name:
    Hans
    can you post a reduced version without sensitive data?
    Don't forget to mention de Office version
     
  7. zdenek

    zdenek Thread Starter

    Joined:
    Sep 5, 2011
    Messages:
    5
    I would post it but I have it actually changed and so I just would like to find out and then possibly use it there again... But in this case its not about big peace of code where the problem would be somewhere else... I thing if you create two simple empty forms and one report and use my cmd for opening as dialogs it will do the same to you I guess... And my version is 2007.
     
  8. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    6,560
    First Name:
    Hans
    Okay, I'll see if I can create something and test, but I'll need time for it.
     
  9. zdenek

    zdenek Thread Starter

    Joined:
    Sep 5, 2011
    Messages:
    5
    OK perfect thanks but you dont need any complicated coding just create two forms and one even empty report and just open a window as a dialog and then the report from the opened window... Thanks
     
  10. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - Access report window
  1. rocknroller404
    Replies:
    0
    Views:
    438
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1016146

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice