Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Access Error Message On Close

Status
Not open for further replies.

swaggel1

Technical User
Jun 19, 2001
34
US
I am trying to disable the Close ("X") button on the Access application window (I have already taken care of the X button on the form) so that users must click the Close button I created on the form to run the necessary procedures.

Thanks to a lot of help on this forum, I am almost there. I am still having a problem, though. If I test the form and click the "X" button, it does not work and I get my message to the users stating that they can't use the X and must click the Close button. I then get an Access error message stating "Microsoft Access may have encountered an error while trying to save a record. If you close this object now, the data changes you made will be lost. Do you want to close the database object anyway?"

If I select Yes the form closes and the changes are not saved. If I select No, then the form remains and I am able to continue working within the form and can use my Close button to exit successfully.

If I could just get rid of this Access message, I think I would be done with disabling the "X" button. Any assistance would be appreciated. If you need to see the code I have used for BeforeUpdate (which I assume is launching this Access error message), let me know and I will post it. I am using Acces 2000.

Thanks!
 
Show us how you're doing this, and the line of code that throws the error.

I've got the method I use detailed at
Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Access Databases for Non-Profit Organizations

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top