splitting address from one field to two

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In address fields I need to split the 2nd line of the address into a separate
field. The addresses (if there is a second line) are searated by carriage
return.
Any ideas for how I can get the 2nd line and put them into a separate column?
Thanks for any help.
 
Hi Denise,

I'd use a little custom function like this and call it from the update
query:

Public Function GetSecondLine(V As Variant) As Variant

On Error Resume Next 'to return Null if there's only one line
SafeSplit = Split(V, vbCrLf)(1)

End Function
 
Back
Top