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

Custom Message form won't display when closing Access

P: n/a
I have a custom message form that I want to display when the user shuts down
my app. Some clean up needs to be done during shutdown and I want to display
this form and then display various messages in the label on the form as the
shutdown cleanup proceeds.

I have a hidden Startup form. So in the Startup form OnClose event, I am
loading the message form and then changing the label caption as the code
proceeds to do the cleanup of various items.

The problem is that when I shutdown Access, the message form never loads
completely and only a shell can be seen. None of the text that I am setting
can be seen. The code proceeds with the cleanup and then Access closes.

Now if I instead open the Startup Form and then close only that form (not
shutting down Access via the main menu bar "X" or the "Exit" command), the
message form is displayed completely and all of the text that I want the user
to see (as the cleanup proceeds) is displayed as well. In this situation I
am only closing the Startup form and not Access.

The code to open the message form and to change the caption of the label is
liberally peppered with DoEvents; but to no avail when shutting down Access
(but works fine if just closing the Startup Form).

There must be something about the Access shutdown process that is preventing
this message form from being fully displayed.

Suggestions, comments, thoughts are very much appreciated.

Thanks.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200611/1

Nov 12 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a


On Nov 12, 11:38 am, "rdemyan via AccessMonster.com" <u6836@uwe>
wrote:
I have a custom message form that I want to display when the user shuts down
my app. Some clean up needs to be done during shutdown and I want to display
this form and then display various messages in the label on the form as the
shutdown cleanup proceeds.

I have a hidden Startup form. So in the Startup form OnClose event, I am
loading the message form and then changing the label caption as the code
proceeds to do the cleanup of various items.

The problem is that when I shutdown Access, the message form never loads
completely and only a shell can be seen. None of the text that I am setting
can be seen. The code proceeds with the cleanup and then Access closes.

Now if I instead open the Startup Form and then close only that form (not
shutting down Access via the main menu bar "X" or the "Exit" command), the
message form is displayed completely and all of the text that I want the user
to see (as the cleanup proceeds) is displayed as well. In this situation I
am only closing the Startup form and not Access.

The code to open the message form and to change the caption of the label is
liberally peppered with DoEvents; but to no avail when shutting down Access
(but works fine if just closing the Startup Form).

There must be something about the Access shutdown process that is preventing
this message form from being fully displayed.

Suggestions, comments, thoughts are very much appreciated.

Thanks.

--
Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-access/2006...
Yes, "There must be something about the Access shutdown process that is
preventing
this message form from being fully displayed." . That something is the
concept of closing the application.

You need to move the actual docmd.quit to the closure form, and simply
trigger the closure of your opening form from your close commandbuttom.
You will need to prevent the user from clicking on the [x] in the
application menu bar, there is code for that on the web.

Nov 13 '06 #2

P: n/a
Thanks for the reply, but...

I actually was able to solve the problem. The key is to use the Repaint
command.

So after opening the form:

Forms!MessageForm.Repaint
DoEvents

This does the trick and the messageform will now be fully displayed.

rq******@sympatico.ca wrote:
>On Nov 12, 11:38 am, "rdemyan via AccessMonster.com" <u6836@uwe>
wrote:
>I have a custom message form that I want to display when the user shuts down
my app. Some clean up needs to be done during shutdown and I want to display
[quoted text clipped - 28 lines]
>--
Message posted via AccessMonster.comhttp://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-access/2006...

Yes, "There must be something about the Access shutdown process that is
preventing
this message form from being fully displayed." . That something is the
concept of closing the application.

You need to move the actual docmd.quit to the closure form, and simply
trigger the closure of your opening form from your close commandbuttom.
You will need to prevent the user from clicking on the [x] in the
application menu bar, there is code for that on the web.
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200611/1

Nov 13 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.