Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Address Printing 3 or 4 Lines (A2k (9.0.4402) SR-1)

    Address Printing 3 or 4 Lines

    A2k (9.0.4402) SR-1

    I have a report with potential 4 print lines of address

    strName
    strAddr1
    strAddr2
    strCityStateZip

    If strAddr2 is blank or null I want to print the following without a blank line.

    strName
    strAddr1
    strCityStateZip

    Can

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Address Printing 3 or 4 Lines (A2k (9.0.4402) SR-1)

    No need to code, just set the Can Shrink property of the textbox containing strAddr2 to Yes.
    Francois

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Address Printing 3 or 4 Lines (A2k (9.0.4402) SR-1)

    I've already defined this function in a module:

    Public function nl( )
    nl=vbCrLf
    end function

    I then have a single textbox for the name and address fields on my report, the controlsource for which is the following.

    namefield + nl() & address1 + nl() & address2 + nl() _
    & city & ", " & state & " " & zip

    If any of the fields above are null, the combination of "Null + nl()" produces a null, so no extra line feed is generated.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •