WarrenTheWindmill
Programmer
Want an easy way of setting up a multiple line address?
Use this formula (courtesy of Frobisher) :
Dim Address(6) As String
Local I
Local AddressOut As String
If Not IsNull({ADDRESSES.ADDR_LINE1}) Then
Address(1) = {ADDRESSES.ADDR_LINE1}
End If
If Not IsNull({ADDRESSES.ADDR_LINE2}) Then
Address(2) = {ADDRESSES.ADDR_LINE2}
End If
If Not IsNull({ADDRESSES.ADDR_LINE3}) Then
Address(3) = {ADDRESSES.ADDR_LINE3}
End If
If Not IsNull({ADDRESSES.ADDR_LINE4}) Then
Address(4) = {ADDRESSES.ADDR_LINE4}
End If
If Not IsNull({ADDRESSES.ADDR_LINE5}) Then
Address(5) = {ADDRESSES.ADDR_LINE5}
End If
If Not IsNull({ADDRESSES.POST_CODE}) Then
Address(6) = {ADDRESSES.POST_CODE}
End If
For I = 1 To 6
If Address(I) <> "" Then
AddressOut = AddressOut & Address(I) & Chr(13) & Chr(10)
End If
Next I
AddressOut = AddressOut & Chr(13) & Chr(10)
Formula = AddressOut
Use this formula (courtesy of Frobisher) :
Dim Address(6) As String
Local I
Local AddressOut As String
If Not IsNull({ADDRESSES.ADDR_LINE1}) Then
Address(1) = {ADDRESSES.ADDR_LINE1}
End If
If Not IsNull({ADDRESSES.ADDR_LINE2}) Then
Address(2) = {ADDRESSES.ADDR_LINE2}
End If
If Not IsNull({ADDRESSES.ADDR_LINE3}) Then
Address(3) = {ADDRESSES.ADDR_LINE3}
End If
If Not IsNull({ADDRESSES.ADDR_LINE4}) Then
Address(4) = {ADDRESSES.ADDR_LINE4}
End If
If Not IsNull({ADDRESSES.ADDR_LINE5}) Then
Address(5) = {ADDRESSES.ADDR_LINE5}
End If
If Not IsNull({ADDRESSES.POST_CODE}) Then
Address(6) = {ADDRESSES.POST_CODE}
End If
For I = 1 To 6
If Address(I) <> "" Then
AddressOut = AddressOut & Address(I) & Chr(13) & Chr(10)
End If
Next I
AddressOut = AddressOut & Chr(13) & Chr(10)
Formula = AddressOut