Merge 2 columns into one.

G

Guest

Hi I know this is simple but cant seem to get my head around it.

I have two columns "Address Postcode 1" e.g. N3 and "Address Postcode 2"
e.g. 4LL. I want to combine them into one postcode with a space in between
e.g. N3 4LL.

Any ideas how? What I thought was right brought the message "address
postcode could refer to more than one table listed in the FROM clause of your
SQL statement".

Cheers
 
R

Rick Brandt

JamesTH said:
Hi I know this is simple but cant seem to get my head around it.

I have two columns "Address Postcode 1" e.g. N3 and "Address Postcode
2" e.g. 4LL. I want to combine them into one postcode with a space in
between e.g. N3 4LL.

Any ideas how? What I thought was right brought the message "address
postcode could refer to more than one table listed in the FROM clause
of your SQL statement".

Cheers

Why don't you post "what you thought was right" so we can let you know if it is?
Normally you would use something like...

Address Postcode: [Address Postcode 1] & " " & [Address Postcode 2]
 
G

Guest

Your error message tells me that you have at least two tables in your query
and that these two have a field named "Address Postcode 1".
The answer to your problem is to include the table name with the field name
like this --
Postcode: [YourTable].[Address Postcode 1] & " " & [YourTable].[Address
Postcode 2]
 
G

Guest

I have put in:

PCode: [tbl_victims]![Postcode1] & " " & [tbl_victims]![Postcode2]

Then it seems to be ok - toggling between design view and preview has merged
the columns. Then when I go to make table query it comes up with Invalid
Arguement.


Rick Brandt said:
JamesTH said:
Hi I know this is simple but cant seem to get my head around it.

I have two columns "Address Postcode 1" e.g. N3 and "Address Postcode
2" e.g. 4LL. I want to combine them into one postcode with a space in
between e.g. N3 4LL.

Any ideas how? What I thought was right brought the message "address
postcode could refer to more than one table listed in the FROM clause
of your SQL statement".

Cheers

Why don't you post "what you thought was right" so we can let you know if it is?
Normally you would use something like...

Address Postcode: [Address Postcode 1] & " " & [Address Postcode 2]
 
R

Rick Brandt

JamesTH said:
I have put in:

PCode: [tbl_victims]![Postcode1] & " " & [tbl_victims]![Postcode2]

Then it seems to be ok - toggling between design view and preview has
merged the columns. Then when I go to make table query it comes up
with Invalid Arguement.

And that error goes away if you do not include the calculated column above?

I can think of no reason for that.
 
G

Guest

I think there could be something wrong with access or a conflict. I just
tried to run a simple make table query I do everyday and had the same result.
Thankyou anyway

Rick Brandt said:
JamesTH said:
I have put in:

PCode: [tbl_victims]![Postcode1] & " " & [tbl_victims]![Postcode2]

Then it seems to be ok - toggling between design view and preview has
merged the columns. Then when I go to make table query it comes up
with Invalid Arguement.

And that error goes away if you do not include the calculated column above?

I can think of no reason for that.
 

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