adding texts fields

  • Thread starter Thread starter 123xxxxx
  • Start date Start date
1

123xxxxx

is it possible to add to text field together then put it in another field in
a new table? if so how would i do it?
 
is it possible to add to text field together then put it in another field in
a new table? if so how would i do it?

The & operator concatenates text fields: for instance, you could put a
calculated field into a query

Address: [StreetNum] & " " & [StreetName] & " " & [StreetType]

to convert "1241", "Maple", "Ave" to "1241 Maple Ave".

Be careful creating a new table if the only reason to do so is for a
report or onscreen display: most of the time you can just use a Query
(with a concatenation expression like this) instead; you may not need
the new table at all, and if the concatenation is storing actually
different values in the same field, you almost surely should NOT
create such a new table!
 
Yes, but why would you need this? You can always "create" the concatenated
string by using a query, code, or form.

You'll need to tell us more information about whether you're doing this in a
form, in a query, etc.
 
to add the first name to the last name and put it in a table so i can use it
for future use, so i dont need to type out the name of the person all the
time
 
No need to combine the values and put them in a single field. You can use a
query at any time to display the combined names. For example, suppose you
want to use a combo box for a user to select a person from the dropdown
list. You could use a Row Source query similar to this:

SELECT PersonID, [FirstName] & " " & [LastName] AS FullName FROM
TableName ORDER BY [LastName];

Make column 1 be the bound column and set the column widths property to
this:
0"; 2"

That way, when the dropdown list shows, the person sees the combined names,
but when the user selects a name, the value of the combo box (which can be
used in query criterion expressions or for other purposes) is the primary
key that identifies the person.
 
to add the first name to the last name and put it in a table so i can use it
for future use, so i dont need to type out the name of the person all the
time

Reread Ken's and my suggestion. You are apparently assuming that you
must have a Table containing the field in order to avoid typing it in
every time; this assumption is incorrect!

If you have the LastName field and the FirstName field in a table, you
can create a Query concatenating those names: e.g.

FullName: [FirstName] & " " & [LastName]

Save this Query.

You can now use the Query as the recordsource for a Form or a Report;
you can use this Query to export to a text file or to Excel; you can
use the FullName field for searching or for sorting; you can do
ANYTHING with this query (except edit the FullName field).

Nobody has suggested that you should "type out the name of the person
all the time". We're suggesting that you use the tools that Access
provides.
 
ok thank you

John Vinson said:
to add the first name to the last name and put it in a table so i can use it
for future use, so i dont need to type out the name of the person all the
time

Reread Ken's and my suggestion. You are apparently assuming that you
must have a Table containing the field in order to avoid typing it in
every time; this assumption is incorrect!

If you have the LastName field and the FirstName field in a table, you
can create a Query concatenating those names: e.g.

FullName: [FirstName] & " " & [LastName]

Save this Query.

You can now use the Query as the recordsource for a Form or a Report;
you can use this Query to export to a text file or to Excel; you can
use the FullName field for searching or for sorting; you can do
ANYTHING with this query (except edit the FullName field).

Nobody has suggested that you should "type out the name of the person
all the time". We're suggesting that you use the tools that Access
provides.
 
Back
Top