Customise the X button

associates

Registered User.
Local time
Today, 09:18
Joined
Jan 5, 2006
Messages
94
Hi,

I have a question on the Control Box X Button which is right on the top right hand corner of Access database. I'd like to customise it in a way that if user by accident, click it, it'd ask the user if they want to quit or not. If yes, then close the database or else, leave everything as they are.

I have successfully performed enabling and disabling the X button. However, i'd still like to be able to let it enabled while having the feature as i described above.

I was wondering if anyone might be able to give me some advice.

Thank you in advance
 
associates said:
Hi,

I have a question on the Control Box X Button which is right on the top right hand corner of Access database. I'd like to customise it in a way that if user by accident, click it, it'd ask the user if they want to quit or not. If yes, then close the database or else, leave everything as they are.

Thank you in advance

You may try having a hidden form that opens when you activate the application. In the hidden form's OnUnload method, you can have a messagebox that opens saying "Are you sure you want to quit?". If they click No, then Cancel = True.

I hope this helps.

SHADOW
 
Why not disable the Close X button so that they can not close your application unless they use your custom Exit button from a form?

You already have the code on how to disable the Close X button.

Enable/Disable The Control Box X Button
 

Users who are viewing this thread

Back
Top Bottom