LogIn and Tracking LogIn

connerlowen

Registered User.
Local time
Today, 02:45
Joined
May 18, 2015
Messages
204
Hi,

I am new to this website as well as Microsoft Access. I am doing an internship for a company which wants me to create a database for them and I am having some trouble. I have a login form that is a pop-up and when the users log in they are directed to their respected form for their department checking access level ID's. I need help with being able to track the log in and log out times of the employees. Also, I need help with creating a home screen for each department. Any help would be greatly appreciated.

Thank you.
 
I have to say, that if you are untrained in MS Access, it seems very surprising that they would ask you to create a database, unless they are also similarly unexperienced.

Databases are not like spreadsheets. A user with a relative basic understanding of a spreadsheet could probably achieve something credible. This is virtually impossible with a database.

Are you starting with the login form, or have you already developed functionality?
 
the login form is functional. it automatically takes the employee to the form for their respected department. I need to be able to track login and logout times
 
I would have a table with

username, event (ie login or logout) and datetime

in login, I would populate a record for the user
on logout, ditto.

I would probably not have a single record with both login and logout times, although perhaps some would.

you can obtain the date and time with now()
 
I have a table with all of the employees in it and the username on the login screen is a drop down box with names. are you saying I need an additional table with just the names and a login time and a log out time? My Idea would be to have a log out button within each form for the departments and when that is clicked it takes them back to the log in form as well as logs the time.
 
To track login/logout times, you need a table to hold individual entries. I can think of a couple of ways to do this, but they will boil down to either persistent sessions or doing a subsequent scan to match up in/out times.

The persistent session concept is that you make the table have an autonumber PK. Store the user's login name, the session ID (which is handled by Access), the user's computername (see the Environ function, e.g.), and the IN time. Look at the record you just created and read the session ID. Put that in a variable in the declaration area of some general module in the DB so that your user's session can be looked up later. When the user logs out, find that session ID, open the recordset to that session (because after all, you now have the PK), and update it to include the OUT time.

The other method is to record an entry from your popup form to show IN times if they click the login button or OUT times if they click the logout button. Then with judicious sorting, you can compute session information from two events.

Note that EITHER of these methods suffer from the same issue. If your user is a total dolt who turns off his computer without logging off, or if he just abandons sessions and logs out of Windows (without logging out of your DB), you will not have OUT times, and there is no way to assure that you will get those times. (The OUT times suffer from this well-known but rarely appreciated fact: A computer's attention span is no longer than its power cord.)

Therefore, when dealing with this situation, your first and best bet is to be sure that your management knows you can't solve all of the problems yourself. Sometimes you need an edict from management that folks with frequent "dangling" sessions will have to attend a mandatory security class - at a time NOT of their choosing. When you have problem users, programming isn't always the answer. Annoyance factors and threats from management - plus a few scapegoat examples - work wonders.
 
Is there any way to track all activity within the database while a certain user is logged in? Each department will have their own form when they login to the database. Within that form they will be reading some things, and also entering some data and so on. My management wants to be able to track anything an employee does while logged in to the database. Each employee will be working only within the form for that department and entering some data.

If there is anything else I could post to help further explain please let me know because as I said, I am new to all of this.

thanks.
 
Is there any way to track all activity within the database while a certain user is logged in? Each department will have their own form when they login to the database. Within that form they will be reading some things, and also entering some data and so on. My management wants to be able to track anything an employee does while logged in to the database. Each employee will be working only within the form for that department and entering some data.

If there is anything else I could post to help further explain please let me know because as I said, I am new to all of this.

thanks.

There is a way to track the user's coming and going and doing things but that's a bit a bit complicated. You need to create a tracking table and then write it every time some action takes place. You can write a function which identifies the form and action like
Code:
TrackUser("frmMyDepartment", "Updating Record")
and run it every time some actionable event takes place in the appropriate event of the form.

Best,
Jiri
 
it comes back to your initial remark

I am new to this website as well as Microsoft Access.
I am not sure what your database is doing, but surely it's far more important to address the dbs functionality, then worry about bells and whistles such as managing and tracking usage. Or is the dbs working as you want already?
 
the database is far from working. I am going to focus on the functionality on it and come back to the tracking feature at a later date. thank you for the advice. It just seems like so much to do.
 
conner.

I added this as an edit to my last, but you had already posted again.

I have now seen your other threads which all start with the same phrase. I think you need to have a serious discussion with your sponsoring firm. What you are trying to do is just not a job for a beginner.

In any event, you need to start with a data analysis phase. And definitely not worry about how access and excel communicate with each other.
 
I already have a lot of the needed data in the database. I am new to databases, but I am not new to coding. I have imported a lot of data from excel and have completed a lot of the background information. I am stuck on putting it all together the way my management and I want it. The pain need from the database is production visibility. The management wants to be able to see where anything is at any time. I know this is a big job, and my management knows it as well. They know I am inexperienced and it will take me a while to complete the task. I have over a month to get this database done and there is one more they want me to create.
 

Users who are viewing this thread

Back
Top Bottom