I'm a trainer trying to demo a function in my application. I have an audit table in my Access database with cols for date, start time, end time, event, username. I'm using a query tool that will send a SQL statement to the audit table when the user logs on and logs off.
insert into myaudit(Datets, Startts, Event, Username) values (DATE(),TIME(),'LogOn','Jane')
All works well except there is row for the log on event and a separate row for the log off event, and I haven't figured out how to capture the username (right now I have it hardcoded in the SQL.
I want to use an update statement to get the log off event on the same row as the users log on, but can't figure out what to use in the where clause. Any suggestions.
Thanks in advance.
insert into myaudit(Datets, Startts, Event, Username) values (DATE(),TIME(),'LogOn','Jane')
All works well except there is row for the log on event and a separate row for the log off event, and I haven't figured out how to capture the username (right now I have it hardcoded in the SQL.
I want to use an update statement to get the log off event on the same row as the users log on, but can't figure out what to use in the where clause. Any suggestions.
Thanks in advance.