Okay, someone explain this one. I retrieve the environment variable USERNAME and assign it to a string variable. I can even show it in a MSGBOX and it shows "Owner". In my code I want to assign the value to a text box when it gets focus. It does it, but it flashes blue and then disappears and the text box appears blank, but if I save the record and go back to it? The value is there.
Dim strUserName As String strUserName = Environment.GetEnvironmentVariable("USERNAME") MsgBox(strUserName) LogInNameTextBox.Text = Convert.ToString(strUserName)