Recording to a table Who is logged on to Database, When they logged on and when they logged off.
Gets tricky as I really would like the info to come from the mdw file(all users go through this for access)
If someone can help would be great. Need my hand held for this as I have been attempting to do this for over a month with no real success. I have so many samples that don’t quite make it happen I am now totally confused.
I would like to create a form that will show the users connected to the database. It would be kind of a tracker who opened the database to work on some cases. The form could show all users from the datbase from top to bottom and to the right a green or red round dot that she/he is active opened the database or not active (closed the database or did not open it still)
I was thinking that it could be applied when the main form opens and that form captures the login from windows into the "tracker" form.
I guess it will only work when the "tracker" form is first open. If the "tracker" form is open later, how to capture those logged in earlier?
I have some code that when a check box in a table is ticked, sends a pop up message to the users logged in (message is on a hidden form), then it closes the DB after a pre-dtermined period of time.
The problem I'm having is that we are a large site with a about 25 differnet servers that our users log onto via Citrix, when a user is on a different server it isn't displaying the message nor closing the DB down.
trying to achieve this? Or is there a better way to see who is logged in and get a message to them?
I'm using Access 2003 btw
Code I'm using below
Code: Option Compare Database Private Sub Form_Load() Me.TimerIntderval = 10000 ' change to 300000 for about 5 minutes End Sub Private Sub Form_Timer() DoCmd.Close Application.Quit End Sub
I have a list box with a row source query as follows...
SELECT qryPendingCompletions2.ID, qryPendingCompletions2.Department, qryPendingCompletions2.[Employee Name], qryPendingCompletions2.CompletionDate AS [Completion Date], qryPendingCompletions2.[Entered By], qryPendingCompletions2.Goal, qryPendingCompletions2.Comments, qryPendingCompletions2.[Verified By] FROM qryPendingCompletions2 WHERE (((qryPendingCompletions2.Department)=[cbocurrentemployee].[column](3)) AND ((qryPendingCompletions2.[Verified By]) Is Null)) ORDER BY qryPendingCompletions2.Department;
I also have a combo box at the top of the form showing what user is logged in where the row source query is the following...
SELECT Employees.UserID, [First Name] & " " & [Last Name] AS EFullname, Employees.AccessLevelID, Employees.Department FROM Employees WHERE (((Employees.AccessLevelID)=1 Or (Employees.AccessLevelID)=2 Or (Employees.AccessLevelID)=3 Or (Employees.AccessLevelID)=4));
How to only list the data in the list box when the department is the same as the logged in user.
So I'd like to add the criteria to the first query something like criteria = [cbocurrentemployee].[column](3) but this doesn't seem to work as criteria in queries.
I found this database with an LOGIN sample. This is working perfectly...(see example)
Now I want to accomplish this:
Based on the user that is logged in I want to generate reports. Is there a way to recall the username or userID and link that to specific reports...
Allso I want to add an mail adress field in the userstable and based on the logged in user I want to hit a mail button and it will check the logged in user... and mail the report to that specific user...
I used the following script "GetCurrentUserName()" in access 2003 to get the username of the logged user. I’m using the following script "CurrentUser()" in access 97 but it always recognise any user as a admin. Is there anyone that could tell me how to solve this please? Thanks
In an network environment that requires users to log in, is there any way for Access to record a user who opens an Access application. The application has no security applied to it. The .ldb has the users listed, but can the .mdb put it into a list inside the .mdb?
Hi, I have a sub, which shows in the Intermediate window who is currently logged to the database. This is my code:
Sub ShowUserRosterMultipleUsers() Dim cn As New ADODB.Connection Dim rs As New ADODB.Recordset Dim i, j As Long
Set cn = CurrentProject.Connection
' The user roster is exposed as a provider-specific schema rowset ' in the Jet 4.0 OLE DB provider. You have to use a GUID to ' reference the schema, as provider-specific schemas are not ' listed in ADO's type library for schema rowsets
Set rs = cn.OpenSchema(adSchemaProviderSpecific, _ , "{947bb102-5d43-11d1-bdbf-00c04fb92675}")
'Output the list of all users in the current database.
Continuing with production of my database I've come across another wall that I'm trying to pass. My aim is when the user press the "Quit" button it will export everything to a file which is stored on Google Drive as google drive is installed on the laptops that will be using this database.
However the problem is Google drive is stored in the computer user files i.e C:UsersstudentGoogle Drive - is there a way to retrieve the name of the user that is logged into windows?
Code:
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" _ (ByVal IpBuffer As String, nSize As Long) As Long Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" _ (ByVal lpBuffer As String, nSize As Long) As Long Function ThisUserName() As String Dim LngBufLen As Long Dim strUser As String
[code]....
However cant get this to work - I think that is probably because i'm declaring this code in the wrong place - I've tried declaring the private functions in a class module and the functions in a module - however no success - How do you set this code up? Or is there a new way to do this?
I have a login screen that works fine but I need to lock some part of the system from normal users but I can't figure out how to track if the user who is logged on is security level is high and can authorize the transaction!!!
I have users table and in it I record the users, passwords, security level. So when someone logs on I have no way of knowing who they are and in order check their security level. I did it in the past by setting the C drive VOL into a value and search but as we use Citrix XenApp this is not possible the C drive is the server drive and if multiple users login to to that server then the VOL value would be wrong.
The database has to be handled by a web service and/or a web appliction making the comma delimited option occupy more server time breaking down the string into usable user_ID's. But (and this is probably my actual problem) if i was to impliment my second idea, I'm not sure what I should make the tables primary key or the best way to relate it to the main user table.
My initial thought is to just have a, technicaly useless, ID be the primary key and impliment a one(User) to many(friends entries) relationship... but im a bit of an access n00b so thought i better come ask for some advice.
I have searched this subject out and tried some of the solutions but have more questions.
All I really need is a table with the username, date/timeIn and date/timeOut of the "database" forms, reports and all that don't matter...yet.
I am able to get the user info to show on a form (that comes up on startup) but can't get the info from the form into a table. I have tried an append query but no luck. If I see it on a form shouldn't I be able to "grab" it? I have used all kinds of code found here to "get" the info and same problem, I can see but I can't touch.
I have created the following code to put the date and username into a table to track any changes made to a record. All I am interested is when the change was made and by who.
When I change a record the Now() command works fine and puts the date and time but the Username = User_FX does not grab the logged in to win nt domain user any Ideas
Private Sub Form_BeforeUpdate(Cancel As Integer) ' Log the user details to the table Me!SystemUsername = User_FX Me!RecordChanged = Now() End Sub
My audit trail is doing fine, but now my boss needed the "memo" to be highlighted or numbered so its easier to see whether the record was updated. (And the date wasn't enough:mad: ) So is there any possible way to have it highlighted/numbered after edited??
Hi, I am trying to use Audit Trail in Access2000. I tried to look at this snippet from Microsoft. But I am getting an error when I save the record. Actually I have a form with 8 tab pages. It tracks that the change is made, even though it gives error message, but does not track which field was changed. I would appreciate if someone can help me. Regards K
Function AuditTrail() On Error GoTo Err_Handler
Dim MyForm As Form, C As Control, xName As String Set MyForm = Screen.ActiveForm
'Set date and current user if form has been updated. MyForm!Updates = MyForm!Updates & Chr(13) & Chr(10) & _ "Changes made on " & Date & " by " & CurrentUser() & ";"
'If new record, record it in audit trail and exit sub. If MyForm.NewRecord = True Then MyForm!Updates = MyForm!Updates & Chr(13) & Chr(10) & _ "New Record """ End If
'Check each data entry control for change and record 'old value of Control. For Each C In MyForm.Controls
'Only check data entry type controls. Select Case C.ControlType Case acTextBox, acComboBox, acListBox, acOptionGroup ' Skip Updates field. If C.Name <> "Updates" Then
' If control was previously Null, record "previous ' value was blank." If IsNull(C.OldValue) Or C.OldValue = "" Then MyForm!Updates = MyForm!Updates & Chr(13) & _ Chr(10) & C.Name & "--previous value was blank"
' If control had previous value, record previous value. ElseIf C.Value <> C.OldValue Then MyForm!Updates = MyForm!Updates & Chr(13) & Chr(10) & _ C.Name & "==previous value was " & C.OldValue End If End If End Select Next C
TryNextC: Exit Function
Err_Handler: If Err.Number <> 64535 Then MsgBox "Error #: " & Err.Number & vbCrLf & "Description: " & Err.Description End If Resume TryNextC End Function
I know this has been asked many times and I have tried following all the threads but I have been struggling and cannot get the audit trail to work on a subform. Please, does anyone have a working example, or can point me to one, of the audit trail working on a subform ? I've been tearing my hair out trying to get it to work. :confused:
I currently have a "customer" form (which displays client details from a table - name, address etc) I would like to add history comments for each customer.
Does anyone know how i would go about doing this.
I image i could press a button on the current "customer" form that will open a history form which after typing a comment would be displayed on the main "customer" form, with date, time and comment. I would obviously be able to add lots of comments to each record.
I need to write a db for my boss where he can access his patient treatment information. How can I make the db (Access '03) to be able to add new treatment to the same patient and to display all treatments seperately on a form? There are about 500 patients. Appreciate any assistance.
Hi. I am creating a contact management database. Also I am new to Microsoft Access. How would I create a calling history record for each of the clients in the contact database? What would be the best way and how would I go about it? The calling history ideally would include the call recipient, time, date, subject and notes. Thanks. Take care.
I am trying to create a historical record of Employees at our business. What I would like to do is have a query that will create a begin date and create that date for each day starting w/ like 1/1/06 and continue thru Date()-1. For example:
Jane Doe and John Doe started employment on 1/1/06. Jane Doe was employed until 1/5/06. So using their "Hire Date" I would like the query to do this..
Created Name Hire Date Termination
1/1/06 Jane Doe 1/1/06 1/5/06 1/1/06 John Doe 1/1/06 1/2/06 Jane Doe 1/1/06 1/5/06 1/2/06 John Doe 1/1/06 1/3/06 Jane Doe 1/1/06 1/5/06 1/3/06 John Doe 1/1/06 1/4/06 Jane Doe 1/1/06 1/5/06 1/4/06 John Doe 1/1/06 1/5/06 Jane Doe 1/1/06 1/5/06 1/5/06 John Doe 1/1/06 1/6/06 John Doe 1/1/06 1/7/06 John Doe 1/1/06
So in this case Jane Doe will show up every day in the "Employee List" until she was terminated. Is it possible to loop a date like this in a query or will I have to make an estranged table with a list of dates? TIA for any help.
I have 2 fields - "Balance" and "Date" - each time data in the "balance" field changes, the "Date" field updates to todays date (thanks to help from Kiwiman in the forum earlier).
I now need to keep a history/log of all data input into balances and the dates.
The new field to store this information is called "Balance History". so an example of what i want to end up with would be