Pookiemeister
Well-known Member
- Joined
- Jan 6, 2012
- Messages
- 626
- Office Version
- 365
- 2010
- Platform
- Windows
On my form I have two textboxes. The values for these textboxes are being pulled from a query. In this query, there are two fields labeled Badge_ID and FullName. When a Badge_ID is entered into the first textbox, I use the DLookUp to locate the matching Name for that Badge_ID number and place the FullName of that employee in the EmpName textbox. I found a YouTube video that shows how to do that and it showed to put the following code in the "Control Source" of the EmpName textbox.
The problem is when the form loads, #Error appears in the Employee_IDtxtbx. I saw another YouTube video that this can be fixed by using Nz (Null Zero) but I can't figure out where in that code to place it. Thank you.
VBA Code:
=DLookUp("FullName","FullName","Badge_ID=" & [EmployeeIDtxtbx])