I am working on a way to track users who log in and out of 6 Access databases (front end) in different locations (network drives) into a table in an exclusive database with details (fields) such as ConnectionID; Username; User Computer name; database name; date/time logged in; date/time logged out.
I have placed an append query on the OnLoad property of the First form that opens in each database (which is never closes as long as the Access database front end is up and running). This First form is different in different database front ends i.e. it can be the welcome form or the menu form or a form displaying the title/name of the database). The append query inserts the ConnectionID (incremental based on previous maximum value); Username; User Computer name; database name; and date/time logged in.
I have placed an update query on the OnClose property of the first form. The update query updates the date/time logged out for the ConnectionID based on the user’s Username.
This setup is working as intended but I wanted to know if there was a function that can be used which would eliminate the need to place queries on the OnLoad and OnClose properties of the form.
I have found and functions for Username; User Computer name; and database name on the internet which are used as criteria for these fields in the queries but don’t know how I can achieve this process without using individual (first open) forms in different databases.