This SQL command in VBA computes the user name, host name, time stamp and the task as the Form or Report name.
Answer this riddle...
Form or Report is to Me.Name as
Name of DB is to ???
I need to capture the name of the Db the person is using so I can differentiate the forms and reports.
DoCmd.SetWarnings False
DoCmd.RunSQL " INSERT INTO LOG_REPORT ( [DATE], [USER], HOST ,TASK )" & _
"SELECT now() AS [DATE], environ('username') AS [USER], environ('computername') AS HOST ,'" & Me.Name & "'"
DoCmd.SetWarnings True
Answer this riddle...
Form or Report is to Me.Name as
Name of DB is to ???
I need to capture the name of the Db the person is using so I can differentiate the forms and reports.
DoCmd.SetWarnings False
DoCmd.RunSQL " INSERT INTO LOG_REPORT ( [DATE], [USER], HOST ,TASK )" & _
"SELECT now() AS [DATE], environ('username') AS [USER], environ('computername') AS HOST ,'" & Me.Name & "'"
DoCmd.SetWarnings True