In a three line address is there a way to move the third line to the second line if the second line is blank and blank out the original third line. This would leave no blank line in the two line addresses?
In a three line address is there a way to move the third line to the second line if the second line is blank and blank out the original third line. This would leave no blank line in the two line addresses?
Could try using concatenation with a mix of + and & characters.
+ sign causes concatenation with string and Null to return Null.
& sign causes concatenation with string and Null to return string.
F1 & Chr(13) & Chr(10) & (F2 + Chr(13) + Chr(10)) & F3
Or a VBA custom function to return concatenated string.
Or set 3 textboxes to AllowShrink and AllowGrow to yes. Set their height to 0 and position them up against each other.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Hi
You can use the following in an Unbound Textbox:-
=([Companyname]& Chr(13) & Chr(10)) &
([Address1]+Chr(13)+Chr(10)) &
([Address2]+Chr(13)+Chr(10)) &
([Address3]+Chr(13)+Chr(10)) &
([Town]+Chr(13)+Chr(10)) &
([PostCode]+Chr(13)+Chr(10)) & [Country]
You can PM me if you need further help.
Good Reading https://docs.microsoft.com/en-gb/off...on-description
I use this for mailing addresses
Code:Function MailingAddress(Optional St As Variant = Null, Optional Cty As Variant = Null, Optional State As Variant = Null, Optional Zip As Variant = Null, Optional Apt As Variant = Null) As Variant MailingAddress = (St + vbNewLine) & ("Apt " + Apt + vbNewLine) & (Cty + ", ") & (State + " ") & Zip End Function
If this helped, please click the star * at the bottom left and add to my reputation- Thanks