Closing Acc2010 database unexpected with task manager

Hello ALL,

I have a hidden form opened when the database opens and i have an event on the OnClose Event to do some tasks that triggers when the database closes.
This works fine when database quits normal.
But the problem is when the database quits abnormally (i.e. computer locks or shuts off) and we have to use the Task manager then the event on the hidden form doesn't trigger.
What can i do?
Thanks in advance
LVL 1
frimyAsked:
Who is Participating?
 
NerdsOfTechTechnology ScientistCommented:
Try to have your close function create a flag variable. Then upon open, nothing will happen. Yet, if the flag isn't created, upon open do what you needed to do at close.
0
 
frimyAuthor Commented:
It looks like nobody has a solution yet.
I just want to know if there is a solution if the system closes unexpectedly or not so I can take alternate steps to avoid the problem.
please let me know
Thanks
0
 
frimyAuthor Commented:
Sound like a very good idea, I'm going to try it out.
Thanks

There is only one problem, what will happen if the user has open the system twice?
I think I will have to restrain the user to open the same database twice.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.