Public Function autoexec()
Dim Computer_Name As String * 12
Dim user_name As String * 12
Dim strname As String * 255
GetUserNameA user_name, Len(strname)
GetComputerNameA Computer_Name, Len(strname)
DoCmd.RunSQL ("insert into audit_log (who_logged_in,when_logged_in) values ([computer_name],now())")
End Function
|