We help IT Professionals succeed at work.

MS Access 2003 - Record Current User in a table

kevin1478
kevin1478 asked
on
Dear Experts,

I have been using the following as the default value in a table field:

=Environ$("UserName")

Its purpose is to record the current username in the table. It has been working but now it is not. The error is 'unknown function in validation expression.
 Does anyone know what is going wrong?
Comment
Watch Question

CERTIFIED EXPERT

Commented:
If you install A2003in the recommended way, this is the normal situation.
Environ() is regarded as one of the 'Unsafe Expressions '  which is now barred from use in property settings.

See here:
http://office.microsoft.com/en-us/access/HA011225981033.aspx#050

look at the 5th Q for specific reference to Environ
CERTIFIED EXPERT
Commented:
Just re-reading this, I'm not sure this solution will work for a Default value, as you can't use a user defined function as a default value for a table field.
You will probably have to move your default entry to your data entry form.

 

Author

Commented:
Thank you.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.