Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

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
    > > >

    > >
    > >
    > >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page