Uldis007
New member
- Local time
- Today, 02:18
- Joined
- Nov 17, 2021
- Messages
- 22
Hi!
In the Access form I have a text box that by default displays the name of the system user who is logged in to the system. But the problem is that the username is displayed in the format "firstname.surname". I need to replace the "dot" with a "space" and the first letters of the name and surname in capital letters.
I use this to get a windows username
Option Compare Database
Option Explicit
Public Function GetUserName() As String
GetUserName = Environ("UserName")
End Function
In the Access form I have a text box that by default displays the name of the system user who is logged in to the system. But the problem is that the username is displayed in the format "firstname.surname". I need to replace the "dot" with a "space" and the first letters of the name and surname in capital letters.
I use this to get a windows username
Option Compare Database
Option Explicit
Public Function GetUserName() As String
GetUserName = Environ("UserName")
End Function