
Originally Posted by
Beetle
Even though Environ returns a string, in order to apply it to the Default Value property of a control you still need to wrap it in additional string delimiters
Me!YourTextBox.DefaultValue = """" & Environ("Username") & """"
That doesn't work either.
At least not when I tried it
However this should work
Add this function to a standard module
Code:
Public Function GetUserName()
GetUserName = Environ("UserName")
End Function
Then in the control source or default value for your textbox, enter