Hide blank fields in a report?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report that involves a lot of groups, each includes up to 4 names.
If a group only consists of 1, 2 or 3 names, I would like to block the other
3, 2, or 1 (respectively) blank field(s) from being visible. The effect of
this would be to shorten each group to show only what is actually there, and
save a lot of page space.
 
I think we are going to have to understand more for anyone to be able to be
of help. What is the relationship between the "1, 2, or 3 names" and the
groups? Are the "names" detail records within the group, or are they fields
within a table, or ???. Please clarify and someone may be able to make
useful suggestions.

Larry Linson
Microsoft Access MVP
 
OBrien,

The Can Shrink property of the 'names' textbox may be applicable here.
Set this property to Yes, and also the Can Shrink property of the
relevant report section itself. Then, as long as there are no other
non-shrinking controls on the same "horizontal" level as the names
textboxes, the controls will collapse if they are blank.
 
I changed the can shrink property in all of the controls of a report and put
this in the detail format:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.TransType.Visible = (Me.[TransType] <> "ADJ")
Me.Date.Visible = (Me.[TransType] <> "ADJ")
Me.Amount.Visible = (Me.[TransType] <> "ADJ")
End Sub

The problem is there are blank lines where these records would be. How do I
remove those lines?
thanks!
 
I found this post because I was having a similar problem. This helped reduce
the number of blank rows, but I had to also sort the records in the query so
that only one blank row "showed" up at the end of the list.
 
kc said:
I found this post because I was having a similar problem. This helped reduce
the number of blank rows, but I had to also sort the records in the query so
that only one blank row "showed" up at the end of the list.

sbcaco said:
I changed the can shrink property in all of the controls of a report and put
this in the detail format:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.TransType.Visible = (Me.[TransType] <> "ADJ")
Me.Date.Visible = (Me.[TransType] <> "ADJ")
Me.Amount.Visible = (Me.[TransType] <> "ADJ")
End Sub

The problem is there are blank lines where these records would be. How do I
remove those lines?


Have you set those text box's and their section'sCanShrink
property to Yes?

If you did, then there is probably some other control in the
same "horizontal band" that is prevents the space from being
reclaimed.
 
Back
Top