VBA Access a report window dont stay as dialog window

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

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 :)
 

Keebellah

Trusted Advisor
Joined
Mar 27, 2008
Messages
6,611
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.
 

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???
 

Keebellah

Trusted Advisor
Joined
Mar 27, 2008
Messages
6,611
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/
 

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 :-(
 

Keebellah

Trusted Advisor
Joined
Mar 27, 2008
Messages
6,611
First Name
Hans
can you post a reduced version without sensitive data?
Don't forget to mention de Office version
 

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.
 

Keebellah

Trusted Advisor
Joined
Mar 27, 2008
Messages
6,611
First Name
Hans
Okay, I'll see if I can create something and test, but I'll need time for it.
 

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
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Staff online

Top