[mso] Re: Access Query

  • From: "Green" <1z@xxxxxxxxxxxxxx>
  • To: <mso@xxxxxxxxxxxxx>
  • Date: Thu, 17 Mar 2005 18:05:10 +0100

You could try making a function for what you want. Something like

Function fncSplitAddress(spAddress As String)
' Get the street from an address.

Dim slSplitAddress() As String
Dim slStreet As String
Dim ilN As Integer

ReDim slSplitAddress(0)
slSplitAddress = Split(spAddress)
slStreet = ""
For ilN = 1 To UBound(slSplitAddress) - 1
  slStreet = slStreet & slSplitAddress(ilN)
Next ilN
fncSplitAddress = slStreet
'
**********************************************************************
**
End Function

But you need to be *sure* your data all has the same format to be
certain that dropping 1st and last items gives you what you want all
the time.

You could add other stuff to check for the common "types" I guess but
you'd probably always miss one. For example the code would not cope
with a place that had a name like... "The White House"... you'd end up
with "White"!!... or a place name with no type... "3005 Belmont"...
that would give you nothing at all!!!

anyway... HTH
Lisa


> Address
> 3006 Robin Terry Ct
> 4622 Canipe Dr
> 209 Nellie Yale Pl
> 2809 Round Hill Ct
>
> I need to pull out the Street Name not the HouseNumber or
> the StreetType
> Any Idea's


*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: