trouble with columns/fields

  • Thread starter Sharing will save the world.
  • Start date
S

Sharing will save the world.

This is the thrid time I am trying to post a message.
After several searches, I cannot locate my previous two posts.

I am importing an Excel spreadsheet into a preexisting Access database.
However, the spreadsheet has two columns for addr1 and addr2, and the
database has only one field for this information. I need to get the data of
both columns into one field.

There are at least two ways to go about this. I can try to combine the data
into
one column in excel before importing into Access or I can import the
spreadsheet
into a new Access database and use the features in Access to combine the data
into one field. Either way, how do I do this?

Cheers,
Claudia
 
J

John Nurick

Hi Claudia,

Import or link the Excel worksheet as it is. Then use an append query to
move the data into the Access table.

In the query, use a calculated field to concatenate the two address
fields into one. If the address field in the existing table is called
"Address", the calculated field will look like this in the query design
grid:
Address: [addr1] & Chr(13) & Chr(10) & [addr2]

That puts addr1 and addr2 on separate lines,
addr1
addr2
If you want them on the same line
addr1 addr2
use
Address: [addr1] & " " & [addr2]
 

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