How do I concatinate fields?

C

cri77ers

This should be an easy answer for you experts out there.
I want to concatinate fields in my report so the first
and last name of the customer appear together. I think I
do this somehow with the expression builder?? I'm just a
rookie so need help ASAP please. Thanks!
 
C

Cheryl Fischer

Create a new text box on your report named txtFullName. In the Control
Source property insert:

=Trim([FirstName]) & " " & Trim([LastName])

If the actual Field Names in your database are not FirstName and LastName,
just adjust the code above appropriately.
 
C

cri77ers

Thanks for responding....but like I said, I'm a rookie.
1. Do you mean for me to create this text box on the
report or do I do that back at the query??
2. Where do I find the "control source property thingy"
you mentioned?

Please be patient with me....I really need help for this
project. Thanks!

-----Original Message-----
Create a new text box on your report named txtFullName. In the Control
Source property insert:

=Trim([FirstName]) & " " & Trim([LastName])

If the actual Field Names in your database are not FirstName and LastName,
just adjust the code above appropriately.

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

cri77ers said:
This should be an easy answer for you experts out there.
I want to concatinate fields in my report so the first
and last name of the customer appear together. I think I
do this somehow with the expression builder?? I'm just a
rookie so need help ASAP please. Thanks!


.
 
C

Cheryl Fischer

My initial response was for creating a new, unbound (not connected to any
field in a table or query) text box on your report. Doing your
concatenation this way means that you have no need to create your
concatenated field, FullName, in your query; you create your concatenated
control within the report itself. To set the Control Source property,
simply right click on the new Text Box; you will see a pop-up menu; select
the Properties menu option. Click the tab labeled 'Data' and you will see
the Control Source property. That is where you would insert your
formula/expression:

=Trim([FirstName]) & " " & Trim([LastName])

However, Access often provides more than one way to do something. As an
alternative to the above, you can create a calculated field in your query by
inserting the following in the top row of an empty column in the Query
Designer:

FullName: Trim([FirstName]) & " " & Trim([LastName])

Doing it this way means that the FullName control on your report is a Bound
Control - it is bound to the FullName field in your query. When you drag
this field onto the report, you do not need to do anything else to its
properties.

It's your choice as to which you prefer to use.

hth,
--
Cheryl Fischer
Law/Sys Associates
Houston, TX

cri77ers said:
Thanks for responding....but like I said, I'm a rookie.
1. Do you mean for me to create this text box on the
report or do I do that back at the query??
2. Where do I find the "control source property thingy"
you mentioned?

Please be patient with me....I really need help for this
project. Thanks!

-----Original Message-----
Create a new text box on your report named txtFullName. In the Control
Source property insert:

=Trim([FirstName]) & " " & Trim([LastName])

If the actual Field Names in your database are not FirstName and LastName,
just adjust the code above appropriately.

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

cri77ers said:
This should be an easy answer for you experts out there.
I want to concatinate fields in my report so the first
and last name of the customer appear together. I think I
do this somehow with the expression builder?? I'm just a
rookie so need help ASAP please. Thanks!


.
 
C

cri77ers

BLESS YOU!!! You are WONDERFUL!! This works
great...you saved the day. thanks.
-----Original Message-----
My initial response was for creating a new, unbound (not connected to any
field in a table or query) text box on your report. Doing your
concatenation this way means that you have no need to create your
concatenated field, FullName, in your query; you create your concatenated
control within the report itself. To set the Control Source property,
simply right click on the new Text Box; you will see a pop-up menu; select
the Properties menu option. Click the tab
labeled 'Data' and you will see
the Control Source property. That is where you would insert your
formula/expression:

=Trim([FirstName]) & " " & Trim([LastName])

However, Access often provides more than one way to do something. As an
alternative to the above, you can create a calculated field in your query by
inserting the following in the top row of an empty column in the Query
Designer:

FullName: Trim([FirstName]) & " " & Trim ([LastName])

Doing it this way means that the FullName control on your report is a Bound
Control - it is bound to the FullName field in your query. When you drag
this field onto the report, you do not need to do anything else to its
properties.

It's your choice as to which you prefer to use.

hth,
--
Cheryl Fischer
Law/Sys Associates
Houston, TX

cri77ers said:
Thanks for responding....but like I said, I'm a rookie.
1. Do you mean for me to create this text box on the
report or do I do that back at the query??
2. Where do I find the "control source property thingy"
you mentioned?

Please be patient with me....I really need help for this
project. Thanks!

-----Original Message-----
Create a new text box on your report named txtFullName. In the Control
Source property insert:

=Trim([FirstName]) & " " & Trim([LastName])

If the actual Field Names in your database are not FirstName and LastName,
just adjust the code above appropriately.

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

This should be an easy answer for you experts out there.
I want to concatinate fields in my report so the first
and last name of the customer appear together. I think I
do this somehow with the expression builder?? I'm just a
rookie so need help ASAP please. Thanks!


.


.
 
C

Cheryl Fischer

You're welcome - glad to have been of help.

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

cri77ers said:
BLESS YOU!!! You are WONDERFUL!! This works
great...you saved the day. thanks.
-----Original Message-----
My initial response was for creating a new, unbound (not connected to any
field in a table or query) text box on your report. Doing your
concatenation this way means that you have no need to create your
concatenated field, FullName, in your query; you create your concatenated
control within the report itself. To set the Control Source property,
simply right click on the new Text Box; you will see a pop-up menu; select
the Properties menu option. Click the tab
labeled 'Data' and you will see
the Control Source property. That is where you would insert your
formula/expression:

=Trim([FirstName]) & " " & Trim([LastName])

However, Access often provides more than one way to do something. As an
alternative to the above, you can create a calculated field in your query by
inserting the following in the top row of an empty column in the Query
Designer:

FullName: Trim([FirstName]) & " " & Trim ([LastName])

Doing it this way means that the FullName control on your report is a Bound
Control - it is bound to the FullName field in your query. When you drag
this field onto the report, you do not need to do anything else to its
properties.

It's your choice as to which you prefer to use.

hth,
--
Cheryl Fischer
Law/Sys Associates
Houston, TX

cri77ers said:
Thanks for responding....but like I said, I'm a rookie.
1. Do you mean for me to create this text box on the
report or do I do that back at the query??
2. Where do I find the "control source property thingy"
you mentioned?

Please be patient with me....I really need help for this
project. Thanks!


-----Original Message-----
Create a new text box on your report named
txtFullName. In the Control
Source property insert:

=Trim([FirstName]) & " " & Trim([LastName])

If the actual Field Names in your database are not
FirstName and LastName,
just adjust the code above appropriately.

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

This should be an easy answer for you experts out
there.
I want to concatinate fields in my report so the first
and last name of the customer appear together. I
think I
do this somehow with the expression builder?? I'm
just a
rookie so need help ASAP please. Thanks!


.


.
 
G

Guest

I tried the same thing in a report. But keep getting a pop-up window "Enter Parameter Value Trim" with an entry box and buttons [OK] [Cancel], If I click on [OK], report is generated but have #Error where concatinated fields should be.
I'm running Access 2003

What do I do now? A work around is to not use the function Trim.

Tom S.
----- cri77ers wrote: -----

Thanks for responding....but like I said, I'm a rookie.
1. Do you mean for me to create this text box on the
report or do I do that back at the query??
2. Where do I find the "control source property thingy"
you mentioned?

Please be patient with me....I really need help for this
project. Thanks!

-----Original Message-----
Create a new text box on your report named txtFullName. In the Control
Source property insert:
=Trim([FirstName]) & " " & Trim([LastName])
If the actual Field Names in your database are not
FirstName and LastName,
just adjust the code above appropriately.
Cheryl Fischer
Law/Sys Associates
Houston, TX
This should be an easy answer for you experts out there.
I want to concatinate fields in my report so the first
and last name of the customer appear together. I think I
do this somehow with the expression builder?? I'm just a
rookie so need help ASAP please. Thanks!
 
M

Marshall Barton

Tom said:
I tried the same thing in a report. But keep getting
a pop-up window "Enter Parameter Value Trim" with
an entry box and buttons [OK] [Cancel], If I click on
[OK], report is generated but have #Error where
concatinated fields should be.
I'm running Access 2003


The typical cause of that is an unresolved reference. See
this article for a discussion of the subject:

http://members.rogers.com/douglas.j.steele/AccessReferenceErrors.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top