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

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Address Printing 3 or 4 Lines (A2k (9.0.4402) SR-1)

    Author
    Topic
    #364976

    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

    Viewing 1 reply thread
    Author
    Replies
    • #562056

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

    • #562094

      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.

    Viewing 1 reply thread
    Reply To: Address Printing 3 or 4 Lines (A2k (9.0.4402) SR-1)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: