X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Close Form Event Procedure Runtime Error, Access 2016    
post May 15 2019, 10:16 AM

Posts: 64
Joined: 11-July 14

I have a dashboard form that has a procedure to copy my back end into a backup folder when the form is closed. The code is on the close form event and works fine if you close the form by itself. However if I close out access completely using the "x" in the upper right not a control on the form I get a runtime error 2046. I also having it placing a date and time for the last back up in a hidden form that opens adds new record and closes again.

I am guessing the issue is that access is trying to shut everything down before it can complete running the code. Is there a way around this?
Go to the top of the page
post May 15 2019, 10:25 AM

UA Admin
Posts: 34,970
Joined: 20-June 02
From: Newcastle, WA

One approach that is frequently tried is to prevent users from closing the Access application with the Application "X", or close. Permit them only to close your database application by clicking your custom close button.

Would this work for your purposes?

My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    19th May 2019 - 07:34 PM