473,387 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Problems with tracking users

11
I have a table called 'tblEmployee' that holds userID, username and password

A second table called 'METRICS' that holds all the information that is asked in a customer form. Like - first name, last name etc.


When I first enter my database, the user/employee will be asked for its login name and password.

When signed in, a form MAIN MENU will pull up and the user will have an option to click and fill out the customer form or to export all the data saved in METRICS.

Now, I need Access to track as to which user filled the customer form so that when exported to excel, I would know which employee filled which customer form. The time is not important to track but the name of the user is something I really need.

How do I go about doing this? HELP PLEASE!

Thank you.
Dec 16 '11 #1
3 1531
dsatino
393 256MB
There's a lot of ways to go about this, but you need to supply some additional info such as:

Is the application on shared workstations? If so, do the users have to logon to the workstation first?

Is the application split into a Front-end back end?
Dec 16 '11 #2
NeoPa
32,556 Expert Mod 16PB
You're asking about logging transactions.

What you need to do is to copy the relevant information to a separate log table every time you perform one of the transactions you're interested in.

That's the basic concept, and that's all your question warrants at this time. It should be enough for you to take on and make progress with though.
Dec 16 '11 #3
TheSmileyCoder
2,322 Expert Mod 2GB
I personally use this approach:
User has a local frontend, on his own PC, connected to a server on the local network.

I have a LOCAL(Only in frontend) table, tbl_CurrentUser which is hidden. It contains only 1 field, lng_CurrentUserID (number,Long), and always contains only 1 record, the ID of the user logged into the frontend. I have a login form, that upons succesfull user validation (Typing password) updates this record.

In a public module I have the following:
Expand|Select|Wrap|Line Numbers
  1. Option Compare Database
  2. Option Explicit
  3. private lngCurUserID as long
  4.  
  5. Public Function UserID() As Long
  6.     'Returns the id of the current user
  7.     If lngCurUserID = 0 Then
  8.         'Means its not set, so set it
  9.         lngCurUserID = DLookup("lng_CurrentUserID", "tbl_CurrentUser")
  10.  
  11.     End If
  12.     UserID = lngCurUserID 
  13.  
  14.  
  15. End Function
The userID is basicly stored both in a variable, and in the table. As long as everything runs fine, the userID is simply returned as the variable, but in case an unhandled error occurs, the UserID function will check for 0, and if so, get the correct value. (The default value of a long is 0, so in case of error, the value of lngCurUserID will be 0.) In your case the ID to store would come from your tbl_Employees.


Now this just tells me who is logged in but we still need to record that information along with the record. In each of my tables, I have the fields ID_CreatedBy, dt_Created, ID_ChangedBy,dt_Created, bound to controls on the form tb_CreatedBy, tb_DateCreated, tb_ChangedBy,tb_DateChanged. These fields are usually hidden from the user, but you can choose to show them, allthough you would need to convert the ID_CreatedBy into a username.

In the Before_Update event of my forms I use the following (after validation of record):
Expand|Select|Wrap|Line Numbers
  1. If me.NewRecord Then
  2.   Me.tb_CreatedBy=UserID()
  3.   Me.tb_DateCreated=Now()
  4. End IF
  5.   Me.tb_ChangedBy=UserID()
  6.   Me.tb_DateChanged=Now()
I don't know if something similar could be applied for your design. I personally work in an environment where we dont do much in terms of security in the particular applicaiton. Any user with a sufficient level of access knowledge could easily change his ID, but instead of spending alot of resources on making the application more secure we feel its better spent on "real" development of the application. Im just saying this, as its something you need to consider, how high a degree a level of security you wish to have. This is what works for us.
Dec 16 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: hawkon | last post by:
Hi all, I have an important question to ask about how to trap events when the user close the browser window. I'm a ASP programmer and I have s MSSQL database with a user table where I'm able to...
0
by: netnews.comcast.net | last post by:
How does one track a user logon and the SQL that they execute?
14
by: Jim Hubbard | last post by:
Are you up to speed on the difficulties in using the 1.1 .Net framework? Not if you are unaware of the 1,596 issues listed at KBAlertz (http://www.kbalertz.com/technology_3.aspx). If you are...
55
by: drhowarddrfine | last post by:
I'm working on a web site that could use some control using js but am concerned about what problems I may have with potential users having their js turned off. Has anyone had any serious problems...
6
by: George McLean | last post by:
Hello, I am trying to isolate some performance issues. The database is DB2 v8.1 running on a Win2000 server with 4 processors and 1gb of RAM. The application is a GIS application that uses...
9
by: jsale | last post by:
Hello, I am having a problem with multiple users using my asp.net application - namely that if each user clicks save at the same time, some, or all, of the users crash out. Do I need to do...
0
by: slobodan dokic | last post by:
We have apllication that works OK with any browser but IE 6.0 SP2. There are some problems when users click "button" to send data to server. The application is too slow. (Example: one input TextBox...
3
by: Ryker | last post by:
I have a multi user database that I would like to be able to track user actions. Ex Whenever a user creates a new employee record, I would like to "stamp" their id on the record as the one that...
2
by: C# programmer | last post by:
Hi All, I'm working on a project which requires tracking of recent document downloads. There is a feature in which user can download the docs without logining into the website for some of the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.