So after I finished posting the last message I went back and actually read
the top of the page and saw what to do.
I made a new module and called it Username and pasted the following code:
Private Declare Function apiGetUserName Lib "advapi32.dll" Alias _
"GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Function fOSUserName() 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
fOSUserName = Left$(strUserName, lngLen - 1)
Else
fOSUserName = vbNullString
End If
End Function
Then I went to my data access page and put in the following code in the HEAD
section in Script editor
<SCRIPT language=vbscript event=onafterupdate for=CustomerName>
<!--
TellerID.value=fOSUserName()
-->
</SCRIPT>
TellerID is my message box I want the Windows User name in.
I am on a Novell network and everybodys windows username is the same as
thier novell username. So I just want to get the Windows name.