Solved

Writing into the DB before access closes

Posted on 2004-04-30
4
291 Views
Last Modified: 2006-11-17
Hi All,

Help me figure this out please?
I've created a system which writes in the userID and the time when the user logs in. I've also created a logout button which will add the logout time to the same record.
But, the user can choose NOT to click the logout and instead close the entire access.
Now, I have 2 solutions:

1. Detect when access is going to close, write the logout time to the table before closing. The thing is, i don't know how to do that. The detecting part that is...

2. Disable the close buttong (the X button on the top right hand corner) of access.

I'll accept any other solutions if it works too. 8-p

Xhenkaii
0
Comment
Question by:xhenkaii
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 51

Accepted Solution

by:
Steve Bink earned 80 total points
ID: 10962047
Make a form that will be open the entire time the user has Access open.  You can make it invisible, even, to make sure your users don't mess with it.  Use the OnUnload event or OnClose event from that form to do what you need to do.
0
 
LVL 11

Assisted Solution

by:Mighty_Silly
Mighty_Silly earned 45 total points
ID: 10962153
Hi X,

Just wanna say that I agree with Routinet that you can use the form's UnLoad Event to capture EXIT and updates the table with your existing codes.

Let's say you have a Switchboard that is ALWAYS Loaded (either Visible or Not Visible), then on its UnLoad event, call the Logout procedure you have.


-Silly-
0
 
LVL 51

Expert Comment

by:Steve Bink
ID: 10962266
Switchboard is a good call, and is my object of choice.  I've had a couple problem users who decided they didn't need the switchboard and kept closing it in favor of using the db window.  I fixed that by attaching code to close the db when the switchboard closes.  :)
0
 

Author Comment

by:xhenkaii
ID: 10970738
Works great!! Thanks!
I've split the pts becus i used the idea of hiding the values i needed on the switchboard and writing them on the table when the switchboard unloads.

Xhenkaii
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are ā€¦
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final pā€¦

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question