Peter
Here's an API call you can use to get the users Network name:
Private Declare Function apiGetUserName Lib "advapi32.dll"_
Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
This is how to use it:
Function OSUserName() As String
' Returns the network login name
Dim lngLen As Long, lngX As Long
Dim strUserName As String
strUserName = String$(254, 0)
lngLen = 255
lngX = apiGetUserName(strUserName, lngLen)
If lngX <> 0 Then
OSUserName = Left$(strUserName, lngLen - 1)
Else
OSUserName = ""
End If
End Function
> I want to save the NT user name into an Access database as the creator
of
> a record - can any assist me and tell where the user detail file is kept
> Many thanks
> Peter