473,386 Members | 1,795 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,386 software developers and data experts.

Closing Database using a Quit Button

13
I have designed a database and have used the following code to disable the standard Microsoft close button. I want my users to have to click on a Quit button on the switchboard:

Private Sub Form_Unload(Cancel As Integer)
Dim LResponse As Integer

LResponse = MsgBox("Please Use Quit Button on Main Menu", vbOKOnly)
If LResponse = vbOK Then
Cancel = True
End If

End Sub

They get a pop-up reminder that they have to press OK on - which works well - nothing closes. The problem is that they then get the same reminder when they actually press the Quit button - when the press OK it then closes the database, but I want it to close without having to have this pop-up on the Quit Click.
Anyone got any code for this?
Thanks!
EAC
Mar 27 '08 #1
1 1112
SoNew
13
MOVING TO ACCESS VBA.
CLOSE Thread
Mar 27 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Marcus Schneider | last post by:
Normally I close my windows/widgets with destroy and it works fine. Now I have a window (let's call it 1) from where I open an additional window (let's call it 2). I close it. Each window has its...
8
by: simon place | last post by:
Spent some very frustrating hours recoding to find a way of closing a server socket, i'd not thought it would be any problem, however, after complete failure and as a last resort, i looked at the...
1
by: Nathan Bloom | last post by:
Is there a way to force the user of a database to exit and close access through a close button on for example a switchboard menu? If a user closes access by the exit command or the close button...
5
by: nick_faye | last post by:
Hi, I am still a newbie to VB and using MS Access 2000. I am currently trying to provide a preview of reports before printing them. My program is simple: AC.DoCmd.OpenReport "MyReport",...
22
by: alecjames1 | last post by:
I have a form which the user must complete before closing. I have disabled the window x button and use my own exit button. When selected it checks to see if the user has completed the entries...
2
by: AA Arens | last post by:
I have a button which exits the database, but it actually Closes the base, because Access is still active. How to have it exitting the Access app. as well?
8
by: flickimp | last post by:
Hi Have set up a databasde with a quit command button for the user. When the user closes the database, the databse compacts and repairs itself (using the standard tools option). Now then.......
2
by: SoNew | last post by:
I have designed a database and have used the following code to disable the standard Microsoft close button. I want my users to have to click on a Quit button on the switchboard: Private Sub...
10
by: John | last post by:
Hi My app does a few processes and the app can not be closes mid way. Therefore I want to be able to block any attempt of closing app by user such as by clicking on close (cross) or Alt-F4 and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...

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.