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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Merging two fields into one?



 
 
Thread Tools Display Modes
  #1  
Old January 7th, 2010, 10:28 PM posted to microsoft.public.access.forms
SilverSword
external usenet poster
 
Posts: 1
Default Merging two fields into one?

Il give you an example of what I want to do - will explain it much easier.
I want to merge two fields from the same table which is about some people.
How do I merge one field from the table (such as their firstname) with
another (such as surname) to make it look like one field in a database form?
  #2  
Old January 7th, 2010, 10:43 PM posted to microsoft.public.access.forms
Al Campagna[_2_]
external usenet poster
 
Posts: 1,462
Default Merging two fields into one?

SilverSword,
You can use concatenation to combine two (or more) text values.
This is not done in your table, but on a form, or in a query, or on a
report.

On a form, based on your names table, or a query against that table,
place a text control with a ControlSource of...
= FirstName & " " & SurName

Given FirstName = "John" and SurName = "Smith"... the above
would display as...
"John Smith"
--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

"SilverSword" wrote in message
...
Il give you an example of what I want to do - will explain it much easier.
I want to merge two fields from the same table which is about some people.
How do I merge one field from the table (such as their firstname) with
another (such as surname) to make it look like one field in a database
form?



  #3  
Old January 8th, 2010, 12:20 AM posted to microsoft.public.access.forms
Dorian
external usenet poster
 
Posts: 542
Default Merging two fields into one?

That might be a problem if you are intending to allow the user to update the
names. In that case, you would need separate controls bound to each table
column, unless you want to parse and separate the names out before updating
the row.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".


"Al Campagna" wrote:

SilverSword,
You can use concatenation to combine two (or more) text values.
This is not done in your table, but on a form, or in a query, or on a
report.

On a form, based on your names table, or a query against that table,
place a text control with a ControlSource of...
= FirstName & " " & SurName

Given FirstName = "John" and SurName = "Smith"... the above
would display as...
"John Smith"
--
hth
Al Campagna
Microsoft Access MVP 2006-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

"SilverSword" wrote in message
...
Il give you an example of what I want to do - will explain it much easier.
I want to merge two fields from the same table which is about some people.
How do I merge one field from the table (such as their firstname) with
another (such as surname) to make it look like one field in a database
form?



.

  #4  
Old January 8th, 2010, 01:08 AM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Merging two fields into one?

As Al points out, you are better off, in the long run, in keeping two
separate facts in two separate fields. If you need to have the values in
the two fields DISPLAYED as one, all points out that you can use a query to
concatenate them.

What Access stores and what you have it display does not need to be
identical.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"SilverSword" wrote in message
...
Il give you an example of what I want to do - will explain it much easier.
I want to merge two fields from the same table which is about some people.
How do I merge one field from the table (such as their firstname) with
another (such as surname) to make it look like one field in a database
form?



 




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 04:35 PM.


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