By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,503 Members | 2,788 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,503 IT Pros & Developers. It's quick & easy.

Close button bug

P: n/a
Hello,

I have a form in an Access 2003 application which opens maximized.
Its CloseButton property is set to false. On this form I have a
command button that opens a report in preview mode. The report opens
fine. It opens maximized as one would expect. However, the report
preview window's close button is disabled which is confusing to my
users (they have to click the resize button on the preview window
which then restores the close button). Office SP3 does not seem to
help. Is there a better workaround than this to restore my report
preview close button?

I can reproduce this behavior in the Northwind db as follows:

Add a docmd.Maximize to the load event of the Categories form.
Add a command button to the Categories form.
In the command button's click event add

DoCmd.OpenReport "Summary of Sales by Year", acViewPreview, , ,
acWindowNormal

I open the Category form in form view and click the command button and
note that the report preview's close button is not visible.

Bruce
Feb 13 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Wed, 13 Feb 2008 13:35:46 -0800 (PST), Bruce
<de***************@gmail.comwrote:

EXCELLENT message.
I know it doewsn't help right now, but In A2007 the problem goes away:
a form can have the close button off, while a subsequent report has it
on and can be closed that way.
You may want to examine if you REALLY need to suppress the Close
button. There rarely is a good case for it, with the Unload event that
can be cancelled:
if SomeConditionsArentRight() then
Cancel = True
Msgbox "Yo! Can't close right now!"
end if
and a Close event for processing while the form is actually going to
close.

-Tom.

>Hello,

I have a form in an Access 2003 application which opens maximized.
Its CloseButton property is set to false. On this form I have a
command button that opens a report in preview mode. The report opens
fine. It opens maximized as one would expect. However, the report
preview window's close button is disabled which is confusing to my
users (they have to click the resize button on the preview window
which then restores the close button). Office SP3 does not seem to
help. Is there a better workaround than this to restore my report
preview close button?

I can reproduce this behavior in the Northwind db as follows:

Add a docmd.Maximize to the load event of the Categories form.
Add a command button to the Categories form.
In the command button's click event add

DoCmd.OpenReport "Summary of Sales by Year", acViewPreview, , ,
acWindowNormal

I open the Category form in form view and click the command button and
note that the report preview's close button is not visible.

Bruce
Feb 13 '08 #2

P: n/a
On Feb 13, 5:01 pm, Tom van Stiphout <no.spam.tom7...@cox.netwrote:
On Wed, 13 Feb 2008 13:35:46 -0800 (PST), Bruce

<deluxeinformat...@gmail.comwrote:

EXCELLENT message.
I know it doewsn't help right now, but In A2007 the problem goes away:
a form can have the close button off, while a subsequent report has it
on and can be closed that way.
You may want to examine if you REALLY need to suppress the Close
button. There rarely is a good case for it, with the Unload event that
can be cancelled:
if SomeConditionsArentRight() then
Cancel = True
Msgbox "Yo! Can't close right now!"
end if
and a Close event for processing while the form is actually going to
close.

-Tom.
Hello,
I have a form in an Access 2003 application which opens maximized.
Its CloseButton property is set to false. On this form I have a
command button that opens a report in preview mode. The report opens
fine. It opens maximized as one would expect. However, the report
preview window's close button is disabled which is confusing to my
users (they have to click the resize button on the preview window
which then restores the close button). Office SP3 does not seem to
help. Is there a better workaround than this to restore my report
preview close button?
I can reproduce this behavior in the Northwind db as follows:
Add a docmd.Maximize to the load event of the Categories form.
Add a command button to the Categories form.
In the command button's click event add
DoCmd.OpenReport "Summary of Sales by Year", acViewPreview, , ,
acWindowNormal
I open the Category form in form view and click the command button and
note that the report preview's close button is not visible.
Bruce
Hi Tom,

Good suggestion. I imagine I will end up using the form's Unload
event and re-enabling its Close button. It'd just be nice if Access
did what it was supposed to. Thanks for the helpful reply!

Bruce
Feb 14 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.