473,324 Members | 2,313 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Custom Message form won't display when closing Access

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
2 2536


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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Steve Amey | last post by:
Hi all I am creating a basic control to perform some tasks, and I want to declare some events to be raised so they can be handled from the form that the control is on. I can create my own Event...
2
by: Sue | last post by:
I sent an e-mail below and got a responese but i still have the #error message in the subject below: Can someone help me: questions and replies are separted by ----- -------My Questions: I have...
24
by: downwitch | last post by:
Hi, I know this has been covered here and in the .public groups, but it seems like it's been a while, especially around here, so I just thought I'd ask again to see if anyone has figured out a...
4
by: LhK-Soft | last post by:
Hi, I'm active in VC++ for several years now, so I know some things (I think). Using MS-Access I store a db with lots of entries and uses the VBA techniques to export those data to e.g. HTML, XML...
27
by: Wayne | last post by:
I've been clicking around Access 2007 Beta 2 and can't see the custom menu bar designer. Is it in the beta? Maybe I'm blind. The question that comes to mind is: Will custom menu bars be the same...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
2
by: RafaulWolf | last post by:
I have capture data from the serial port and save it in Access database using table adapter. I defined the serial port as a class so that I can use it dynamically as it require user to add multi...
2
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
hyperpau
by: hyperpau | last post by:
Before anything else, I am not a very technical expert when it comes to VBA coding. I learned most of what I know by the excellent Access/VBA forum from bytes.com (formerly thescripts.com). Ergo, I...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.