Report Window close, min, max buttons dissapear

Mr.K

Registered User.
Local time
Yesterday, 21:25
Joined
Jan 18, 2006
Messages
104
I have the following code that runs when Db opens:

For i = 1 To CommandBars.Count
CommandBars(i).Enabled = False
Next i

It hides all the toolbars. Now, when I open a report everything is fine with it - I have "min, max, close" buttons on its window. However, when I maximize it - it maximizes to the point that those buttons dissapear. Therefore then I cannot close the report unless with the shortcut Alt+F4.

Why does it maximize that far that the window buttons dissapear? I posted the code above because I think it may be affecting the maximize somehow.
 
i have the same problem as well as i used the same code at the startup of the database. the solution is to have another code at the start of the report that enables the report preview toolbar (because it has a "Close" button). but i dont know exactly wat code should be used
 
The problem is that I don't want the preview toolbar. I have my custom bar that comes up, to which I can add the close button, but that is not a good solution because of other issues that come up. (That close btn isn't the standard X so the user doesn't see it easily and may go for the X button that is actually the close for the whole DB).

Is there a way to sort of maximize the report window but not all the way? E.g. in code:
docmd.maximize "minus 10pixels from each side"?
 
the close min max buttons r displayed in the menu bar (the one where there is file, edit, bla bla bla.....) how about if we write a code that shows the menu bar but removes the menus from it so that it will just be an empty bar but it will include the close min max buttons
 
the close min max buttons r displayed in the menu bar (the one where there is file, edit, bla bla bla.....) how about if we write a code that shows the menu bar but removes the menus from it so that it will just be an empty bar but it will include the close min max buttons

I ended up adding the Close Current Window btn to my custom toolbar. It works OK but the icon sucks because instead of a "X" it is a "folder with an arrow". I thought about your solution and the down side is an additional empty toolbar going accross the screen just to have the X on the right. (BTW- I disabled the main close btn for the DB).

Let me know how you coded the removal of the other choices from that toolbar.
 
about how to remove the other choices i failed to code it i dnt knu how to do it
how did u disable the main close button of the database?
 

Users who are viewing this thread

Back
Top Bottom