Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COThanks for reminding me of @@SPID. I had a mental margarita on that one. The solution was to create a table in the server to store the hostname and username in Access. The main form open event inserts the hostname from VBA.Environ("COMPUTERNAME") and CurrentUser() into this table. In the audit trigger I find the username with Select @UserName = dbo.AccessUsers.Username FROM sys.sysprocesses INNER JOIN dbo.AccessUsers ON sys.sysprocesses.hostname = dbo.AccessUsers.HostName WHERE (sys.sysprocesses.program_name = 'Microsoft Office 2003') and sys.sysprocesses.spid = @@SPID
      singulars
    2. COThat's great! Is there any way you can store the spid instead of look up the user name real time, and later convert it to the username based on the spid and the date/time (using a table with a history of the current user)? The way you're doing it is fine, it's just best to do as little as possible in a trigger...
      singulars
    3. COI would think that might get messy with users logging in and out. You'd get a large table of repeated information. You'd have to log the time to a table, then trigger the access table as well to find the SPID in SQL or do the insert on the Access side with ADO. I'm with you on having triggers do the smallest amount of work, but I'm thinking it'd be cleaner in the long run to have the trigger find the username. I'm all ears if you can think of a better way of doing it.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload