Snowflake68
Registered User.
- Local time
- Today, 09:43
- Joined
- May 28, 2014
- Messages
- 452
I am trying to lookup the EmpInitials from table tblEmployees but cannot get the criteria working.
On the same form I have a textbox called txtUsername which obtains the Windows username (this works ok). I want to lookup the users initials for the windows username but the code below just shows '#Error'
This must be something simple that I just cant work out. Been looking at this all morning and am going around in circles now so hope someone can spot what I have wrong.
On the same form I have a textbox called txtUsername which obtains the Windows username (this works ok). I want to lookup the users initials for the windows username but the code below just shows '#Error'
Code:
=DLookUp("[EmpInitials]","tblEmployees","[EmpName] =" & [Forms]![frmLogon]![txtUserName])
This must be something simple that I just cant work out. Been looking at this all morning and am going around in circles now so hope someone can spot what I have wrong.