Solved

Splitting an address from a memo field

Posted on 2011-02-28
7
303 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

617 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