Need help making a pretty simple report

G

Guest

Need help making a pretty simple report...but I will post my question
in here forst because it is probably a noob question anyway. Let me
know if I need to take this to a different forum. TIA

I am creating a report from an Access database for scholastic
information. I am taking records and selecting and sorting them by
means of query and thus far that seems adequate.

But I am trying to make a report from the results of the query and I
am looking to see if I can eliminate fields from the results when they
are empty of data. I am probably not describing this clearly but
please forgive my lack of knowledge of the proper terminology.

I have a range of fields that are included in the query - 10 to be
exact. But 10 is the most that will be used and most records have only
the first 4 fields with data. Thus, when there is no data in the field
I would like the report to eliminate that field instead of leaving a
label and empty box. I have selected "can shrink and grow" and that is
working well - but is there any way to eliminate these empty fields in
my final report?

Where would I fix this? In the query design or in the report design?
Or neither because I cannot.

Any help is greatly appreciated to help save some trees on printout :
)

If this is not the proper forum or you know where else would be better
to seek help that is fine too.

TIA
Doof
 
W

Wayne-I-M

Not really - if you have a record with a number of fields
field 1
field 2
field 3
field 4
etc

You can set a criteria to not show the whole record in the report or you can
set the criteria not to show a specific field bhut you can't set a criteria
to show the record but not empty fields

If you put this Not Is Null
in the criteria fields of "all" the field in the query it will filter out
any records that do not have "any" data" but it will still show the records
with "some" data in the report.
 
L

Larry Linson

Provided the Controls in your Report span the entire width, or at least do
not have another Control alongside of them, it seems the CanGrow and
CanShrink properties will do what you want. Check them in Help, and then
post back here if you have problems.

Larry linson
Microsoft Office Access MVP
 
G

Guest

I am still having trouble but I wonder if I eliminate the label for
the field then it will disappear. The online help mentions that I
might need MVB code to achieve this so I will try that next. I would
like to keep my field labels but maybe I will have to do without them.
My adjacent space is empty so I don't think it is a graphic (other
than the field label) that is interfering.
 
J

John... Visio MVP

Steve said:
I provide help with Access applications for a modest fee. I would be glad
to take a look at what you have and if I can help you I would implement
your report for a small fee. If you are interested, contact me at
(e-mail address removed).

Steve

These newsgroups are provided by Microsoft for FREE peer to peer support.

Steve is a local troll who does not understand the concept of FREE support.
He has a a reputation for posting questionable answers, bad advice and
libeling/insulting posters. The lack of repeat business from his past
customers is a good indication of the "quality" of his work.

John... Visio MVP
 
L

Larry Linson

Make your labels into TextBoxes, with ControlSource = "The Label Info You
Want". Set their Can Grow and Can Shrink properties to Yes; Set the Can
Grow and Can Shrink properties of the Detail Section to Yes. In the
OnFormat event, add code similar to this (note my Fields are named
"FirstDisappearingInfo", "SecondDisappearingInfo", and
"ThirdDisappearingInfo"; my corresponding labels are named "txtFirst",
"txtSecond", and "txtThird):

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If IsNull(Me.FirstDisappearingInfo) Then
Me.txtFirst.Visible = False
Else
Me.txtFirst.Visible = True
End If
If IsNull(Me.SecondDisappearingInfo) Then
Me.txtSecond.Visible = False
Else
Me.txtSecond.Visible = True
End If
If IsNull(Me.ThirdDisappearingInfo) Then
Me.txtThird.Visible = False
Else
Me.txtThird.Visible = True
End If
End Sub

You will use, of course, your Field and Control names, but this should make
the labels vanish along with non-existent text content, and the Detail
Section shrink correspondingly.

Larry Linson
Microsoft Office Access MVP
 
L

Larry Linson

Yes, I think that should work. Good idea and much thanks Larry :)

You are most welcome. As do many others, I come here to be of help.

Larry Linson
Microsoft Office Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top