Below is the code that I use in a module. If you want the MDB that has the form, table and how I use it - let me know. Works with MS Network and Novell.
-Eddie
Option Compare Database
Option Explicit
Dim strUserName As String, strNOWcrf As String
'API: Get Login name
Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _
"GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Function fOSUser_Name() 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
fOSUser_Name = Left$(strUserName, lngLen - 1)
Else
fOSUser_Name = ""
End If
End Function