Concatenating Fields defined as qryQueryName.ColumnName?

mbrost

Registered User.
Local time
Today, 14:12
Joined
Jun 27, 2005
Messages
26
Hi

I did a search to no avail...

I am trying to concatenate Address fields into one text box. The Control Source pull-down menu gives me the Field Names listed as QueryName.ColumnName.

I know that if they listed the fields as just ColumnName, you'd simply go:
ColumnName & " " & ColumnName2...

But the way these columns are defined, I cant find the correct syntax.

Is there a way to do this without changing all my queries??

Thanks again! :)

Mike
 
What do you want to store? The single fld or the combined flds?
 
KenHigg said:
What do you want to store? The single fld or the combined flds?

I want to store about 5 address fields concatenated into one long text field.

Thanks.

Mike
 
It may help to back up just bit. If you have these flds stored in one table it sounds like you good just combine them on the fly when needed instead of re-storing the same basic data in another table.

???
 
The fields are stored in an Address Table.

Address is linked to Account (Many Addresses to one Account).
The Account is linked to Inventory. (1 Account can have Many Inventory Machines).

The form is Inventory Data, but I have a Tab that contains Account Info, with their Addresses.

Does this make sense? So these fields are derived from the query that queries the address and account information.

I was hoping this was an easy thing to do :confused:
 
Can you do a subform that does the address stuff?
 
mbrost said:
The fields are stored in an Address Table.

Address is linked to Account (Many Addresses to one Account).
The Account is linked to Inventory. (1 Account can have Many Inventory Machines).

The form is Inventory Data, but I have a Tab that contains Account Info, with their Addresses.

Does this make sense? So these fields are derived from the query that queries the address and account information.

I was hoping this was an easy thing to do :confused:

If I follow you have a Form for Inventory Data. On that form is a Tab control with one of those Tabs showing the Account info. As aprt of the Account info you want to show all the addresses attributable to an account. Is that correct?

I will assume that AccountID is a foreign key in the table on which the main form is based and the account Subform (on the Account Tab) has its own subform bound to the Addresses table.

If that's also correct, then what's the problem?
 
The problem is the concatenating together of the fields to make the address "appear" to be one field. I dont know the syntax as outlined in my first post (based on the fact the address fields are all prefixed like QueryName.AddressField) -- when I try to concatenate, I get #Name error in the field...
 
mbrost said:
The problem is the concatenating together of the fields to make the address "appear" to be one field. I dont know the syntax as outlined in my first post (based on the fact the address fields are all prefixed like QueryName.AddressField) -- when I try to concatenate, I get #Name error in the field...

Not sure why you would to concatenate them, but if you do just use a control with a controlsource of:
=filedname & fieldname & fieldname etc.

As long as that control is on the same form, you don't need to specify the tablename.
 

Users who are viewing this thread

Back
Top Bottom