HELP WITH LITTLE PROBLEM

  • Thread starter Thread starter dk
  • Start date Start date
D

dk

Hello everybody !
I need little help from You.
I have procedure to record log in and log out time. Everything goes fine
when user press custom button "close database".
The problem is that many users usualy use "x" button from windows to quit
application.
Is there any possibility to put some code ( call function XXX) on access
application quit or disable windows "x" button.
I find on newsgroups function "disable control box x" made by Calvin Smith,
but it works for forms, not for complete application.

Thank You for Your suggestions !
 
You could take an alternative approach, i.e. leave the x button but make
sure the logoff code fires before the database is closed even if the user
closes it from the x button of the database window or the application
itself. The trick is to use the On Close event of a form that is open at all
times. If you have a switchboard, then you can use its On Close event. If
not, then you can simply create a dummy form that opens on database open and
is immediately hidden, solely for the purpose of using its On Close event to
fire the logoff code. The form (or switchboard) will always close when the
user closes the database or application, and fire the code.

HTH,
Nikos
 
Back
Top