Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Jan 2004
    Location
    Bournemouth, Dorset, England
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Report problem (97)

    Help, I'm new and not very good at this yet. I have a report in which a lot of the fields are blank (data not entered yet, database not redesigned yet) how can I get the report so that neither the label or text box prints if there is no data in the text box?

    Thank you very much in advance

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Report problem (97)

    For text boxes, it is relatively easy: set the Can Shrink property of both the text boxes and of the Detail section of the report to Yes, and make sure that there is no vertical overlap between the text boxes.

    If the text boxes have labels, they will still be printed however, even if the text boxes are blank. You would need to write VBA code to take care of this, so it's easiest if you can do without the labels, or put the labels in the page header section (for a columnar report)

  3. #3
    New Lounger
    Join Date
    Jan 2004
    Location
    Bournemouth, Dorset, England
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report problem (97)

    Thank you - I'll do that for the text boxes - does anyone know a simple bit of VBA code I could use to make the labels go away? Thank you.

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Report problem (97)

    If the label is bound to a textbox, it's visiblity is controlled by whether the textbox is visible. If it's not bound, you can simply use

    Me!LabelName.Visible = Not IsNull( Me!TextboxName)

    Where labelname and textboxname should be replaced with the actual names of the controls.
    Charlotte

  5. #5
    New Lounger
    Join Date
    Jan 2004
    Location
    Bournemouth, Dorset, England
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report problem (97)

    Thank you so much Charlotte - brilliant and easy.

Posting Permissions

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