Problems with Hide/Show DbWindow

PC User

Registered User.
Local time
Today, 06:35
Joined
Jul 28, 2002
Messages
193
I've been trying to utilize the API module to Manipulate the Access Window as provided by Dev Ashish from the MVPS website http://www.mvps.org/access/api/api0019.htm. I've been able to work with forms successfully, but when I try to generate reports the program looses control.

Does anyone have experience with this module? It makes my application look very nice and I'd like to know how to use it effectively.

Thanks,
PC
 
Hide

How about trying this code

To show the database window:
Docmd.SelectObject acTable, , True

To Hide the database window:
Docmd.SelectObject acTable, , True
Docmd.RunCommand acCmdWindowHide
 
PC User said:
I've been trying to utilize the API module to Manipulate the Access Window as provided by Dev Ashish from the MVPS website http://www.mvps.org/access/api/api0019.htm. I've been able to work with forms successfully, but when I try to generate reports the program looses control.

Does anyone have experience with this module? It makes my application look very nice and I'd like to know how to use it effectively.

Thanks,
PC
This will not work for reports because they cannot be popup/modal. This has been disscussed in detail here. I have also a solution for the report problem here
 
Thanks guys for the suggestions. I'll test those out. Since the forms work so well when hiding the application window, my first impression was to start making "reports" with forms instead of reports. Is that confusing? It was starting to work fairly well, except the "reports' from form designs generated over 14,000 pages and I don't know how to limit them to what the actual number of pages might be.

Making "reports" from form designs is a little unorthodox, but I seemed the right direction to go. If you have experience with this as a solution, let me know.

Thanks,
PC
 
Reports from form designs looks a little strange when in form view, because Page Header and Page Footer don't appear until I printout a hardcopy. I can still get page numbering in the Page Footer. I found out that I can print out the correct number of pages using the DoCmd.PrintOut acSelection, , , , , False command. Also I can manually control the page printouts using the
DoCmd.RunCommand acCmdPrint command.

My reports are usually in tabular format with horizontal and vertical lines enclosing the memo fields. To account for the enlarging of the various sizes of the memo fields, I use the CanGrow module from http://www.lebans.com/cangrow.htm in a subform set to continuous form. My next endevour is to use something like the line commands that are used in the regular report designs; so that I can get vertical lines that stretch with the variable sized memo fields.

Does anyone know about these types of vertical lines? This of course is not my preferred method of generating reports, but I do like the appearence of the program that the Hide/Show DbWindow module give it.

Thank,
PC
 
PC User said:
Making "reports" from form designs is a little unorthodox, but I seemed the right direction to go. If you have experience with this as a solution, let me know.
Forms are not designed to work like reports and they are not designed to print. If you want to print (open) a report just do it printing is not a screen thing anyway. If you want to view (preview) use snapshot viewer. I have provided a way plus you can also put a snapshot viewer object on a form. With my export funtion do all the filtering and queries beforehand. If you want to overwrite the same file it is not a problem.
 
Did you try the SelectObject method suggested here and again here ?
I think I already told you that selectobject will not work in these circumstances.
 
You didn't tell me, I've never asked until now, why does it not work in your opinion?
 
You didn't tell me, I've never asked until now, why does it not work in your opinion?
If you have used the code to hide the access window then you would know selecting the report is not the problem, it is making it display topmost of the mdi parent window. The only mdi child windows which display topmost to a mdi application window are popup and dialogue this is fact. Mdi stands for multiple device interface.
 
Nobody suggested selecting the Report, the suggestions of using the select object method makes the db container visible, thereby allowing the Report to be viewed in the normal way and with further code you can remove most of the garbage that accompanies the preview window and maximise the report within it, horses for courses though of course ;)
 
Rich said:
Nobody suggested selecting the Report, the suggestions of using the select object method makes the db container visible, thereby allowing the Report to be viewed in the normal way and with further code you can remove most of the garbage that accompanies the preview window and maximise the report within it, horses for courses though of course ;)
You don't have to use selectobject to do this anyway. If you hadread the code properly you would use this method:
Code:
Call fSetAccessWindow(1) 'show
or
Code:
Call fSetAccessWindow(2) 'maximize
He didn't ask for this however he asked whether you can display reports without having the access window open.
 
dt01pqt said:
You don't have to use selectobject to do this anyway. If you hadread the code properly you would use this method:
Code:
Call fSetAccessWindow(1) 'show
.

No I haven't read the code because the window can be hidden without the reams of code required for this method.
 
Well if you had bothered then you would realise this is not simply about hidding the access window (that is easy) it about showing the forms ontop (so they look like standalone interfaces) at the same time. That is the whole issue with reports they can't be popups. You need to think before you talk sometimes rich. :rolleyes:
 
I could be the terminology that I used in my original question. Instead of stating it as Hide/Show DbWindow, I should have stated it as Hide/Show Access Window. The function that I used hides the Access Window. The routine that trucktime suggested will hide the DbWindow and not the Access Window. The DbWindow is the container that displays all the tables, queries, forms and modules. The Access Window is the container of the entire program. The function that I'm using hides the Access Window, but allows only forms to be displayed.

I've made some progress with the verticle lines in the "form reports" to grow with the CanGrow function, but "form reports" do not display on the screen properly. The report only looks proper when it is printed out. The printing commands work properly as I described earlier. If I have time, I'll try to make a small prototype to show you guys how this works. I don't like the screen display of the "form report" anyway and I'm considering just using a maximized form and for users in our company who have different screen resolutions, I'll have a setup form that will have the resize parameters for their monitors. That way I can go back to using the regular report designs.
 
Oh look mummy, the db window's not visible, and pop up forms too, still no brownie points for having to write reams of code :rolleyes:
 
Last edited:
I see your screen capture, but does mummy have an example to post that doesn't have reams of code like Dev Ashish's and works just like his does? Has anyone told Dev yet? Does mummy's code handle reports?

I tried your commands:
Docmd.SelectObject acTable, , True
Docmd.RunCommand acCmdWindowHide

They do as I describe. They hide the DbWindow, not the Access Window. Is there something that I'm missing? If you have an example that shows that they perform the same as Dev Ashish's code, then I'll understand what you're talking about. So far they don't give the results that I'm looking for; however, they may come in handy someday.

I do appreciate your discussion and your assistance.

Thanks,
PC
 
Last edited:
But you don't want to view Reports in the normal way, so there's no point,
that wasn't my post about acCmdWindowHide by the way ;)
 
Rich said:
But you don't want to view Reports in the normal way, so there's no point,
that wasn't my post about acCmdWindowHide by the way ;)
:p Like I said if you have real mdi children as is the case with Access 97 (possibly 2000) you have to use that code, if the children are just 'floating' independent then it is as easy as 1-2-3. But never-the-less reports can't be popup because they rely on the mdi parent for the functionality.
 

Users who are viewing this thread

Back
Top Bottom