Hi rupe,
the reason that you are seeing #Name is because both Last_Name and
First_Name are in the related table.
If you had a form based on the Customer contact table, then you could use
=[Last_Name] & " " & [First_Name]
and it would work.
Some options for you are
1. Use a combo box as described by John Vinson
2. Change the recordsource of your form by adding the Customer contact table
to the recordsource (the query for the form) and include only the last name
and first name fields from that table.
3. Create a query based on the customer contact table.
Include the primary key and in the next blank column type
FullName: [Last_Name] & " " & [First_Name]
Save the query as qryCustomerFullName
Back on your form you can use a DLookup.
On the Current event of your form put code like this untested air code-->
Me.NameOfTextbox = Nz(DLookup("[FullName]", "qryCustomerFullName",
"[Customer_ID] = " & Me.Customer_ID),"")
Note: replace NameOfTextbox with the real name of the textbox that will show
the customer's name.
Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
rupe said:
Tried this too it is called Customer Contact in the form
thank you for your help
M Skabialka said:
Make sure you don't use either of the field names listed as the name of
you
new control - call it Full_Name or something.
Mich
rupe said:
I trying to combine First and Last names into a form, however I just get
the
#Name?
I have typed =[Last_Name] & " " & [First_Name] in to the contral source
however it just does not work?
Please help i have been trying to do this for ages