B billy Sep 9, 2003 #1 How can I set the default value of a field to the login user in Data Access Page? Thanks.,
N Newbie Sep 9, 2003 #2 Will the following work for you Function fOSUserName() As String fOSUserName = Environ("USERNAME") End Function frm.txtUserName = fOSUserName this sets the field txtUserName to the windows login (Win 2k) HTH Al
Will the following work for you Function fOSUserName() As String fOSUserName = Environ("USERNAME") End Function frm.txtUserName = fOSUserName this sets the field txtUserName to the windows login (Win 2k) HTH Al
D Douglas J. Steele Sep 9, 2003 #3 I would strongly recommend not relying on the Environment variable (since Environment variables are so easy to reset), and to use the API call shown in http://www.mvps.org/access/api/api0008.htm at "The Access Web.
I would strongly recommend not relying on the Environment variable (since Environment variables are so easy to reset), and to use the API call shown in http://www.mvps.org/access/api/api0008.htm at "The Access Web.