My data set are:
- Form titled "Form Members"
- List Box named "Agents"
- Text Box named "EmployeeID".
- Table Source called "tblAssociate" where the employee is under "AssociateName" and employee ID under "AssociateNumber".
When the user clicks on an agent's name in the List Box, the Text Box is supposed to populate agent's employee ID.
QUESTION: How do I get that to work?
So far... my thinking is on the "On Click" event procedure on the List Box is to add a DLOOKUP code, but I can't get it to work:
EmployeeID = DLookup("AssociateNumber", "tblAssociate", "AssociateName = " & [Forms]![Form Members]![Agents])
However, it doesn't work.
Any help is greatly appreciated, thanks.
- Form titled "Form Members"
- List Box named "Agents"
- Text Box named "EmployeeID".
- Table Source called "tblAssociate" where the employee is under "AssociateName" and employee ID under "AssociateNumber".
When the user clicks on an agent's name in the List Box, the Text Box is supposed to populate agent's employee ID.
QUESTION: How do I get that to work?
So far... my thinking is on the "On Click" event procedure on the List Box is to add a DLOOKUP code, but I can't get it to work:
EmployeeID = DLookup("AssociateNumber", "tblAssociate", "AssociateName = " & [Forms]![Form Members]![Agents])
However, it doesn't work.
Any help is greatly appreciated, thanks.
Last edited: