View Single Post
  #18  
Old August 1st, 2006, 07:47 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default How can I make a group not to show/display in a report if no data is under that group?

erick-flores wrote:


This is what my report design looks like:

-----------------------------------------------------------------------------------------------------------
^cmp_id Header==========================================
Tag Num:
Description:
Notes:

^stg_id Header===========================================
Description:
Cyl Num:
Notes:

^cyl_id Header===========================================
Description:
cyl Num:
Material:
Components Material
Part #
-----------------------------------------------------------------------------------------------------------
^cva_id Header===========================================
cva.Description cva.material
cva.part#

^gsk_id Header==================================== -----(1)Here is
where you want me to insert the texbox, right???? or
gsk.Description gsk.material
gsk.part#
(2)txtgsk_Count:--------------Here?

I tried (1) and it did not let me put a textbox in there, then I tried
(2) and it worked when there is data for that group, it actually counts
every record. But when there is no data I got the environment I already
told you...the error message.

So here is an outline of my report, it has more and more groups after
the cyl_id. The principal groups a cmp_id, stg_id and cyl_id all
three are shown every page. Then the cylinder can have multiple
components. So my plan is create a group for each one, and display it
if the cylinder has that component.



No, you can not place controls on the divider bar above the
top of the section. Putting it in the section directly
below the bar is the right place.

I don't understand how a reference to the =Count(*) text box
can produce that error. If there are no details in the
group, then the value of the text box should be 0. You
should not be getting some kind of non-existent value
message. The only way I can think of getting that message
is when you are referring to a control in a subreport that
has no data or if the code is in the report's Open event
instead of the group header section's Format event.

Don't get carried away with too many groups. There is a
limit of 10 grouping levels.

--
Marsh
MVP [MS Access]