D
David P. Lurie
Access 2003 adp
MSDE 2K SP3a
How can the current SYSTEM_USER value be inserted into a column on updates?
I was planning to use a form's before_update event for audit columns to
track the user and time of update with SYSTEM_USER and CURRENT_TIMESTAMP,
respectively.
The table in question has suser_sname() as the column default, which inserts
the SYSTEM_USER value into new records. There is no obvious VBA equivalent
function to use on column updates. CurrentUser won't work, as it has the
value "Admin" from Access, rather than the current SQL Server user.
getdate() as a column default works for a CURRENT_TIMESTAMP value on new
record inserts, and the VBA function now() is equivalent for updates.
Thanks,
David P. Lurie
MSDE 2K SP3a
How can the current SYSTEM_USER value be inserted into a column on updates?
I was planning to use a form's before_update event for audit columns to
track the user and time of update with SYSTEM_USER and CURRENT_TIMESTAMP,
respectively.
The table in question has suser_sname() as the column default, which inserts
the SYSTEM_USER value into new records. There is no obvious VBA equivalent
function to use on column updates. CurrentUser won't work, as it has the
value "Admin" from Access, rather than the current SQL Server user.
getdate() as a column default works for a CURRENT_TIMESTAMP value on new
record inserts, and the VBA function now() is equivalent for updates.
Thanks,
David P. Lurie