473,549 Members | 2,408 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.c om
http://www.accessmonster.com/Uwe/For...ccess/200611/1

Nov 12 '06 #1
2 2552


On Nov 12, 11:38 am, "rdemyan via AccessMonster.c om" <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.c omhttp://www.accessmonst er.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!MessageFo rm.Repaint
DoEvents

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

rq******@sympat ico.ca wrote:
>On Nov 12, 11:38 am, "rdemyan via AccessMonster.c om" <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.c omhttp://www.accessmonst er.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.c om
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
4758
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 Handler class and use that, but I would like to use the System.EventArgs class so that my event can be handled by different controls. For...
2
2942
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 a form with a field that automatically popluates with todays date called "created date". I have another field on the form called "Processing...
24
5420
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 new angle. If I have a class MyClass--not a collection container but a single-level class--that has a bunch of properties of different types, I'd...
4
1933
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 and other kind of data. I'm using MS-VC++6.0-Enterprise (with sp6) at NT4-Workstation (sp6a) and MS-Access97 (from MS-Office97). Reason that I won't...
27
45509
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 height as they were in previous versions or will they be the "ribbon" style that takes up a huge portion of the screen? Also when I use Access...
15
6485
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 accept other controls. The control i drag drop on it becomes the child of my custom control's parent form and not the child of my custom control. Then...
2
2066
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 serial port. And my result is to display on a datagridview in a form. I have a problem, the information is save to the database but it won’t display in...
2
19419
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 will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge. I would be using layman's...
0
2897
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 will be writing this article intended for those who are in the same level, or maybe lower, of my technical knowledge. I would be using layman's...
0
7542
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7467
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7736
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7500
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6066
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5385
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3494
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1961
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
783
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.