Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2003
    Posts
    2

    Cool Unanswered: removing white empty space on an access report when no data is present.

    Hi everybody! Please bare with me if this has already been asked but my searches came up empty. So I thought it would be safe to ask this question. I am constructing a database from scratch that manages enrollment at a school. It is a directory of students, parents, birth days, etc etc. I have a total of 23 controls in the detail section of my report. I say 23 because I am counting each object as a control so each text box label and the associating text box (representing the field of the query) I count as two. One label by itself I am counting as one. What I have done is create a series of macros that checks whether the text box contains data. If it is null, then the field turns invisible. If the next record has data in that field, the field on the report becomes visible again. However, when the report runs it prints empty spaces where the data would be if it was in the record. Is there a way to collapse the white space so that the report only prints/displays data.

  2. #2
    Join Date
    Sep 2003
    Posts
    2
    I wanted to also point out that my research does reveal a can shrink solution but I am not versed on how to do that. I have read that people can get the data boxes to shrink but their corresponding labels dont shrink too. I also have read something about a createreportcontrol method. I do not understand how to implement. I have used the TRIM statement when working with labels but this is not for labels. It is for a brocheur or directory. All suggestions are most appreciated. Thank you.

    Thrashin

  3. #3
    Join Date
    Mar 2004
    Posts
    3
    I'm having the same problem! Did you find a solution??

  4. #4
    Join Date
    Jan 2004
    Posts
    16
    dim ctl as control
    for each ctl in me.controls
    if typeof ctl is textbox or typeof ctl is combobox then
    ctl.visible=not isnull(ctl.value)
    end if
    if typeof ctl is checkbox then
    ctl.visible=ctl.value
    end if
    next ctl


    sorry for my bad english. this code work fine

  5. #5
    Join Date
    Sep 2003
    Location
    Spokane, WA
    Posts
    81

    Hiding Fields

    The previous reply works great to hide the fields that don't have data, but doesn't shrink the form.

    Oh, and change ctl to ctrl.

  6. #6
    Join Date
    Mar 2004
    Posts
    3
    I used text boxes instead of labels.

    =IIf(IsNull(Trim([Features])),"","Features:")

    (Where features is the field)

    Just set the field to Can Shrink.

    Seems to work perfectly...

  7. #7
    Join Date
    Sep 2003
    Location
    Spokane, WA
    Posts
    81

    Arrow Text Boxes v Labels

    It seems to me that I do have text boxs *with* labels.

    I have attached the database for ya'll to look at.
    Attached Files Attached Files

Posting Permissions

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