Good Morning,
I've attempted to create a User box that would show which user is logged into the database on the main form. When the log on box pops up, you put your username and password in and click 'ok'. Which works fine. Once logged in, you're on a navigation screen and can click to open the main 'Employee' form which is where I have a special box that I want to show which user is logged in to the employee screen. The code I have in place is written below. I don't receive any kind of error, but my field that is suppose to read which user is blank. Any ideas? I've also attached a screen grab of the form.
Private Sub Form_Load()
Me.User = Environ("Username")
Me.FullName = DLookup("User_Name", "tblUser", "User_Login ='" & Me.User & "'")
End Sub
I've attempted to create a User box that would show which user is logged into the database on the main form. When the log on box pops up, you put your username and password in and click 'ok'. Which works fine. Once logged in, you're on a navigation screen and can click to open the main 'Employee' form which is where I have a special box that I want to show which user is logged in to the employee screen. The code I have in place is written below. I don't receive any kind of error, but my field that is suppose to read which user is blank. Any ideas? I've also attached a screen grab of the form.
Private Sub Form_Load()
Me.User = Environ("Username")
Me.FullName = DLookup("User_Name", "tblUser", "User_Login ='" & Me.User & "'")
End Sub