works perfect, thanks for your effort.
Now if I wanted to extract the "BURWOOD EAST " what would I do?
Thanks
Here's a function for you.
Function Foo(InString As String) As String
Dim a As Long
Dim b As Long
Dim c As Long
Dim d As Long
c = Len(InString)
a = InStrRev(InString, " ")
b = InStrRev(InString, " ", a - 1)
d = InStrRev(InString, Chr(10))
Foo = Mid(InString, d + 1, b - d)
End Function
>works perfect, thanks for your effort.
>
>Now if I wanted to extract the "BURWOOD EAST " what would I do?
>Thanks

Signature
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.
billybanter67 - 18 May 2008 09:07 GMT
Hi again,
Thanks, now I have placed this function in a module.
Could you pls explain the use of this.
Regards
Richard
> Here's a function for you.
> Function Foo(InString As String) As String
[quoted text clipped - 12 lines]
>
> End Function
ruralguy - 18 May 2008 17:16 GMT
Use it like:
Me.txtPostCity = Foo(Me.txtAddressDetails)
and it should pull 'BURWOOD EAST' from your example.
>Hi again,
>
[quoted text clipped - 10 lines]
>>
>> End Function

Signature
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.