A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

combing Last and First name



 
 
Thread Tools Display Modes
  #11  
Old August 6th, 2009, 10:26 AM posted to microsoft.public.access.gettingstarted
rupe
external usenet poster
 
Posts: 6
Default combing Last and First name

Tried this too it is called Customer Contact in the form

thank you for your help

"M Skabialka" wrote:

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" wrote in message
...
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




  #12  
Old August 6th, 2009, 10:32 AM posted to microsoft.public.access.gettingstarted
rupe
external usenet poster
 
Posts: 6
Default combing Last and First name

I have Customer_ID in the table relating to the form and in my Customer_ID is
the primary key in the Customer_Contact table which I have the First_Name and
Last_Name field hope that sounds right?

Thank you

"Jeanette Cunningham" wrote:

Are Last_Name and First_Name in the query that is the record source of the
form?


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia



"rupe" wrote in message
...
Yes and unfortunately the samething again

"Richard" wrote:

Rupe,

Have you tried a new unbound textbox on your form with:
=[Last_Name] & " " & [First_Name]

Richard


"rupe" wrote:

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




  #13  
Old August 6th, 2009, 02:04 PM posted to microsoft.public.access.gettingstarted
Klatuu
external usenet poster
 
Posts: 7,074
Default combing Last and First name

It has nothing to do with the relationship of the data. I would hope you
have only one name associated with a customer id.

The issue is being able to save the data to the table. One form control
cannot be used by two fields in the form's recordset and be updatable.
--
Dave Hargis, Microsoft Access MVP


"rupe" wrote:

I have checked the spelling over and over, but what do you mean by "it has to
be one field to one control" as i have only one Customer_ID to the linked
Names fields?

Thank you

"Klatuu" wrote:

As already stated, you likely have a spelling problem, but be aware the
control will present the name, but you will not be able to update it because
it has to be one field to one control to be able to update it.
--
Dave Hargis, Microsoft Access MVP


"rupe" wrote:

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

  #14  
Old August 6th, 2009, 04:22 PM posted to microsoft.public.access.gettingstarted
John W. Vinson
external usenet poster
 
Posts: 18,261
Default combing Last and First name

On Thu, 6 Aug 2009 02:24:07 -0700, rupe
wrote:

What is the Recordsource of your form? If it's a query, please post the SQL
view; if it's a table please post the relevant fieldnames.

What's the context? What is the name of the control that you're setting its
control source?

The field names are [Last_Name] and [First_Name], no the last point i have
only text in the fields [Last_Name] and [First_Name] they are not numbers

thank you for your help

"John W. Vinson" wrote:

On Wed, 5 Aug 2009 10:29:05 -0700, rupe
wrote:

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


What are the actual field names in your table? It would seem that they are
something OTHER than [Last_Name] and [First_Name] - perhaps the actual field
is called [Last Name], with a blank?

Or might the fields in your table be Lookup fields? If so, they contain a
number, not the actual name.
--

John W. Vinson [MVP]

--

John W. Vinson [MVP]
  #15  
Old August 6th, 2009, 04:24 PM posted to microsoft.public.access.gettingstarted
John W. Vinson
external usenet poster
 
Posts: 18,261
Default combing Last and First name

On Thu, 6 Aug 2009 02:32:01 -0700, rupe
wrote:

I have Customer_ID in the table relating to the form and in my Customer_ID is
the primary key in the Customer_Contact table which I have the First_Name and
Last_Name field hope that sounds right?


So First_Name and Last_Name are *NOT* fields in this form's table? If so, they
are not available for an expression. You can only concatenate fields that...
ummm... exist in that form's table.

One possibility would be to have a Combo Box bound to the Customer_ID field,
based on a query like

SELECT Customer_ID, [First_Name] & " " & [Last_Name] FROM Customers ORDER BY
Last_Name, First_Name;

to display the name while storing the ID.
--

John W. Vinson [MVP]
  #16  
Old August 7th, 2009, 12:42 AM posted to microsoft.public.access.gettingstarted
Jeanette Cunningham
external usenet poster
 
Posts: 2,190
Default combing Last and First name

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" wrote in message
news
Tried this too it is called Customer Contact in the form

thank you for your help

"M Skabialka" wrote:

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" wrote in message
...
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






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:52 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.