Solved

Splitting an address from a memo field

Posted on 2011-02-28
7
301 Views
Last Modified: 2012-06-21
Hi,

Easy question, my mind's gone blank.  I have a memo field for an address and I need to produce a report with splitting the address to show address, excluding the town and postcode and then a new column for the town.

Thanks
0
Comment
Question by:Tra71
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 2

Expert Comment

by:jo_m
ID: 34995809

Hello  Tra

 could you post a quick sample,   this will make sure  we can help quickly

tx

jo
0
 

Author Comment

by:Tra71
ID: 34995846
Thanks Jo,

It's an access select query, so selecting the address, I want one column to show the address excluding the town and county and then in a second column, I want to show the town.

Thanks
0
 
LVL 2

Expert Comment

by:jo_m
ID: 34995870
Hi again  

 does the address have commas or spaces   eg

 8  Brown St,   Reading,  Berks
 15 Marshall Road  Reading  Berksc  

tx jo

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Tra71
ID: 34995899
Sorry split by carriage return.

Example:

18 Brown Street
Reading
Berks
0
 
LVL 2

Expert Comment

by:jo_m
ID: 34996045
hello

in a query copy the line below into a column
I called the memo field address,  replace this with the name of your memo field

ST: Mid([address],1,InStr([address],Chr$(13) & Chr$(10)))

this will give you the street name.

jo
0
 
LVL 2

Accepted Solution

by:
jo_m earned 250 total points
ID: 34996084

Sorry missed out the next part of the town.


To get the town in another column you need to get the position of the 2nd CRLF:

StreetPos: (InStr([address],(Chr$(13) & Chr$(10))))

 then using this position  you can get the town itself.
Town: Mid([address],[StreetPos]+2)

place these in the columns of a query,  this may go some way to resolving your  issue.

tx jo
0
 

Author Closing Comment

by:Tra71
ID: 34996148
Thank you very much :)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question