Stuart McLachlan
stuart at lexacorp.com.pg
Mon Apr 30 17:23:14 CDT 2007
On 30 Apr 2007 at 15:10, Gale Perez wrote: > Hi! > > It has been a while since I have developed in Access, and I'm reviewing my > old databases (I am very indebted to this group for assistance in developing > them). I cannot remember what the ">" character in the Format property of a > text box does and hoped someone can tell me. > Displays characters as upper case. > I also had been given a function to get the Novell User Name of a user in > order to set user permissions, etc. without having an actual login box (it > gets the Novell user name automatically and compares that to the one stored > in the table to see if the user is in the database). It works beautifully > but now I am working in Windows, and I wondered whether a similar function > exists for Windows (XP and other versions). Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long Function UserName() As String Dim strUName As String Dim lngRetVal As Long strUName = Space$(16) lngRetVal = GetUserName(strUName, 16) strUName = Trim$(strUName) 'strip Chr$(0) from end of name UserName = Left$(strUName, Len(strUName) - 1) End Function -- Stuart