Hello,
I have an input box that when a form is loaded I call a function (that was posted on here) that retrieves the username of the current logged on person...
In this one form its doing weird stuff... At first it fills in the name correctly but there is a space after it... Then if I switch over to another window and come back I can see a square after the username and it looks like []...
What is this symbol? I looked at function and it removes blanks from end of it ... But it is not getting rid of this weird character?
Thanks
--------
sBuffer = Space$(255)
lSize = Len(sBuffer)
Call GetUserNameAPI(sBuffer, lSize)
If lSize > 0 Then
' Remove empty spaces
GetUserName = Left$(sBuffer, lSize)
Else
' Return empty if no user is found
GetUserName = vbNullString
End If
I have an input box that when a form is loaded I call a function (that was posted on here) that retrieves the username of the current logged on person...
In this one form its doing weird stuff... At first it fills in the name correctly but there is a space after it... Then if I switch over to another window and come back I can see a square after the username and it looks like []...
What is this symbol? I looked at function and it removes blanks from end of it ... But it is not getting rid of this weird character?
Thanks
--------
sBuffer = Space$(255)
lSize = Len(sBuffer)
Call GetUserNameAPI(sBuffer, lSize)
If lSize > 0 Then
' Remove empty spaces
GetUserName = Left$(sBuffer, lSize)
Else
' Return empty if no user is found
GetUserName = vbNullString
End If