"Access 2007" Displaying the result of a query in a text box
Posted on 2007-10-13
I have a form (formCalls) based on a table (tblCalls), which has a field called AgentID. I want to display in a text box, (txtAgentName), the agent's FirstName and LastName concatenated together. tblPeople has this name information and AgentID is the index into tblPeople.
I have created a query (query_GetNameOfAPerson):
SELECT [FirstName] & " " & [LastName] AS FullName, tblPeople.ID, tblPeople.FirstName, tblPeople.LastName
WHERE (((tblPeople.ID) Like [Forms]![formCalls]![AgentID]));
The txtAgentName's control source is =[query_GetNameOfAPerson]![FullName]
When the form executes all I get is #Name? in txtAgentName. Why?
Thanks for you help