ngoforth,
Actually, the standard Textbox control in access already provides the functionality you need. Set the InputMask property for your password box to the value 'Password'. The textbox will then display * characters instead of the actual password being entered.
As to how to pick up the current UserName from the system, you can use some code to get the information from windows via API calls...
__________________________________________
Private Declare Function API_GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Private Declare Function API_GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Public Function GetWinComputerName()
Dim strBuf$, lngSize&, lngReturn&
lngSize = 255
strBuf = String(lngSize, " ")
lngReturn = API_GetComputerName(strBuf, lngSize)
strBuf = Left(strBuf, lngSize)
GetWinComputerName = strBuf
End Function
Public Function GetWinUserName()
Dim strBuf$, lngSize&, lngReturn&
lngSize = 255
strBuf = String(lngSize, " ")
lngReturn = API_GetUserName(strBuf, lngSize)
strBuf = Left(strBuf, lngSize - 1)
GetWinUserName = strBuf
End Function
__________________________________________
Place the above code in a module in your database, and you can then call the GetWinUserName() function to get the username from the system. I have also included the GetWinComputerName() function which will return the Computer Name for the users pc. This code works fine on Win98 and NT4. I havn't tried it on 2000 but it should work on that as well.
Hope that helps.
axa
[This message has been edited by axa (edited 11-19-2001).]