Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

removing blank lines on labels

Discussion in 'Information Technology' started by vlh, Jul 28, 2006.

  1. vlh

    vlh
    Expand Collapse
    Guest

    I have set up an address label report using the label wizard. I have all the
    text boxes set to YES for Can Shrink and Can Grow, but I am still getting
    blank lines when say there is no Company Name in the address. Is there
    another way to remove them?

    Thanks,
    Vickie
     
  2. Loading...


  3. Michael H

    Michael H
    Expand Collapse
    Guest

    Hi Vickie.

    Do you have any overlapping controls? Overlapping controls can't grow or
    shrink.

    Also, from Access Help:
    Sections grow and shrink vertically across their entire width. For example,
    suppose a form has two text boxes side by side in a section, and each control
    has its CanShrink property set to Yes. If one text box contains one line of
    data and the other text box contains two lines of data, both text boxes will
    be two lines long because the section is sized across its entire width.

    -Michael


    "vlh" wrote:

    > I have set up an address label report using the label wizard. I have all the
    > text boxes set to YES for Can Shrink and Can Grow, but I am still getting
    > blank lines when say there is no Company Name in the address. Is there
    > another way to remove them?
    >
    > Thanks,
    > Vickie
    >
     
  4. Ken Snell \(MVP\)

    Ken Snell \(MVP\)
    Expand Collapse
    Guest

    Assuming that no company name means that field contains a Null, you can use
    the fact that Nulls propagate through + operations to remove the blank line.
    Use an expression similar to this for the report's textbox that contains the
    address info:

    =[NameOfPersonField] & (Chr(13) + Chr(10) + [NameOfCompanyField]) & Chr(13)
    & Chr(10) & [AddressLine1Field] & [AddressLine2Field] & Chr(13) & Chr(10) &
    [CityField] & ", " & [StateField] & " " & [ZipField]


    With the above expression, if the NameOfCompanyField contains a Null, no new
    line will be started for the company information.
    --

    Ken Snell
    <MS ACCESS MVP>

    "vlh" <vlh@discussions.microsoft.com> wrote in message
    news:C4D4042C-A269-45FB-8990-962F12A2C466@microsoft.com...
    >I have set up an address label report using the label wizard. I have all
    >the
    > text boxes set to YES for Can Shrink and Can Grow, but I am still getting
    > blank lines when say there is no Company Name in the address. Is there
    > another way to remove them?
    >
    > Thanks,
    > Vickie
    >
     
  5. vlh

    vlh
    Expand Collapse
    Guest

    Thank you both, Micheal and Ken,

    Boy do I feel sheepish. I had "spaces" in the textboxes. My kindergarden
    teacher husband pointed it out to me. So embarressed. ; )

    Thanks for the tips though. I probably will use them someday.

    Vickie

    "Ken Snell (MVP)" wrote:

    > Assuming that no company name means that field contains a Null, you can use
    > the fact that Nulls propagate through + operations to remove the blank line.
    > Use an expression similar to this for the report's textbox that contains the
    > address info:
    >
    > =[NameOfPersonField] & (Chr(13) + Chr(10) + [NameOfCompanyField]) & Chr(13)
    > & Chr(10) & [AddressLine1Field] & [AddressLine2Field] & Chr(13) & Chr(10) &
    > [CityField] & ", " & [StateField] & " " & [ZipField]
    >
    >
    > With the above expression, if the NameOfCompanyField contains a Null, no new
    > line will be started for the company information.
    > --
    >
    > Ken Snell
    > <MS ACCESS MVP>
    >
    > "vlh" <vlh@discussions.microsoft.com> wrote in message
    > news:C4D4042C-A269-45FB-8990-962F12A2C466@microsoft.com...
    > >I have set up an address label report using the label wizard. I have all
    > >the
    > > text boxes set to YES for Can Shrink and Can Grow, but I am still getting
    > > blank lines when say there is no Company Name in the address. Is there
    > > another way to remove them?
    > >
    > > Thanks,
    > > Vickie
    > >

    >
    >
    >
     
  6. Wayne-I-M

    Wayne-I-M
    Expand Collapse
    Guest

    =IIf(IsNull([Contact1stName] & " " & [ContactSurname]),"",[Contact1stName] &
    " " & [ContactSurname] & Chr(13)) & Chr(10)
    & IIf(IsNull([Address1]),"",[Address1] & Chr(13)) & Chr(10)
    & IIf(IsNull([Address2]),"",[Address2] & Chr(13) & Chr(10)
    & IIf(IsNull([Address3]),"",[Address3] & Chr(13) & Chr(10))
    & IIf(IsNull([Address4]),"",[Address4] & Chr(13) & Chr(10)
    & IIf(IsNull([Address5]),"",[Address5] & Chr(13) & Chr(10))))


    Note the number of )))) at the end of the address

    Also note that this is NOT the same code as used in Word which is {} (
    press control F9) which does much the same task.



    Hope this helps

    --
    Wayne
    Manchester, England.



    "vlh" wrote:

    > Thank you both, Micheal and Ken,
    >
    > Boy do I feel sheepish. I had "spaces" in the textboxes. My kindergarden
    > teacher husband pointed it out to me. So embarressed. ; )
    >
    > Thanks for the tips though. I probably will use them someday.
    >
    > Vickie
    >
    > "Ken Snell (MVP)" wrote:
    >
    > > Assuming that no company name means that field contains a Null, you can use
    > > the fact that Nulls propagate through + operations to remove the blank line.
    > > Use an expression similar to this for the report's textbox that contains the
    > > address info:
    > >
    > > =[NameOfPersonField] & (Chr(13) + Chr(10) + [NameOfCompanyField]) & Chr(13)
    > > & Chr(10) & [AddressLine1Field] & [AddressLine2Field] & Chr(13) & Chr(10) &
    > > [CityField] & ", " & [StateField] & " " & [ZipField]
    > >
    > >
    > > With the above expression, if the NameOfCompanyField contains a Null, no new
    > > line will be started for the company information.
    > > --
    > >
    > > Ken Snell
    > > <MS ACCESS MVP>
    > >
    > > "vlh" <vlh@discussions.microsoft.com> wrote in message
    > > news:C4D4042C-A269-45FB-8990-962F12A2C466@microsoft.com...
    > > >I have set up an address label report using the label wizard. I have all
    > > >the
    > > > text boxes set to YES for Can Shrink and Can Grow, but I am still getting
    > > > blank lines when say there is no Company Name in the address. Is there
    > > > another way to remove them?
    > > >
    > > > Thanks,
    > > > Vickie
    > > >

    > >
    > >
    > >
     

Share This Page