Concat not working with linked table

D

Debbiedo

I am trying to concatenate the first and last name fields into a
report.

For the Control Source in the properties box for the text box
"FullName" I put the following:

=[First_Name] & " " & [Last_Name]

If the Record Source for the report is a table existing in the current
database, the full name appears correctly in the report preview.

IF I make the Record Source a linked table in the current databse, I
get #Error in the report preview.

I tried using the query builder and it puts this info in it (the
"FormsData" is a linked table in the current databsae)

=[FormsData]!First_Name & " " & [FormsData]!Last_Name
but I still get #Error.

Any idea why I cannot use the concat feature with linked tables?

Both tables are identical, except for location. The linked table is
the one I will be using as it is a daily export of SQL Server data
and shared on a network.

Thanks in advance

Deb
 
D

Duane Hookom

Are First_Name and Last_Name displayed in the field list of your report's
record source? Are there duplicates of these field names?

Did you try just
=[First_Name]
 
D

Debbiedo

Are First_Name and Last_Name displayed in the field list of your report's
record source? Are there duplicates of these field names?

Did you try just
   =[First_Name]

--
Duane Hookom
Microsoft Access MVP



Debbiedo said:
I am trying to concatenate the first and last name fields into a
report.
For the Control Source in the properties box for the text box
"FullName" I put the following:
=[First_Name] & " " & [Last_Name]
If the Record Source for the report is a table existing in the current
database, the full name appears correctly in the report preview.
IF I make the Record Source a linked table in the current databse, I
get #Error in the report preview.
I tried using the query builder and it puts this info in it (the
"FormsData" is a linked table in the current databsae)
=[FormsData]!First_Name & " " & [FormsData]!Last_Name
 but I still get #Error.
Any idea why I cannot use the concat feature with linked tables?
Both tables are identical, except for location. The linked table is
the one I will be using as it is a daily export of  SQL Server data
and shared on a network.
Thanks in advance
Deb- Hide quoted text -

- Show quoted text -

I tried what you suggested and believe it does not work because the
table does not contain any data yet. I was only getting #Error on the
fields that I was doing calculations on (The concatination). Boxes
that just called up one field received no error messages. I assumed
that because some of my fields did not display #Error, that the
problem was not an empty table. I tested it with an empty table
located within the database and got the same error. I guess I can't
design concatination formulas on empty tables. Learn something new
everyday. Thanks for helping.

Deb
 
D

Duane Hookom

You can avoid the #error by either making sure your report always returns
records or changing your control sources to something like:
=IIf([HasData], [FirstName] & " " & [LastName],Null)

--
Duane Hookom
Microsoft Access MVP


Debbiedo said:
Are First_Name and Last_Name displayed in the field list of your report's
record source? Are there duplicates of these field names?

Did you try just
=[First_Name]

--
Duane Hookom
Microsoft Access MVP



Debbiedo said:
I am trying to concatenate the first and last name fields into a
report.
For the Control Source in the properties box for the text box
"FullName" I put the following:
=[First_Name] & " " & [Last_Name]
If the Record Source for the report is a table existing in the current
database, the full name appears correctly in the report preview.
IF I make the Record Source a linked table in the current databse, I
get #Error in the report preview.
I tried using the query builder and it puts this info in it (the
"FormsData" is a linked table in the current databsae)
=[FormsData]!First_Name & " " & [FormsData]!Last_Name
but I still get #Error.
Any idea why I cannot use the concat feature with linked tables?
Both tables are identical, except for location. The linked table is
the one I will be using as it is a daily export of SQL Server data
and shared on a network.
Thanks in advance
Deb- Hide quoted text -

- Show quoted text -

I tried what you suggested and believe it does not work because the
table does not contain any data yet. I was only getting #Error on the
fields that I was doing calculations on (The concatination). Boxes
that just called up one field received no error messages. I assumed
that because some of my fields did not display #Error, that the
problem was not an empty table. I tested it with an empty table
located within the database and got the same error. I guess I can't
design concatination formulas on empty tables. Learn something new
everyday. Thanks for helping.

Deb
 

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