Hi all,
I've got a report that has fields for 10 pieces of evidence for every category. Problem is, there isn't always 10 pieces of evidence. Is there anyway to hide the fields that are blank? I've tried using VBA on the "OnOpen" of the report to say:
if me.Evidence1 <> 0 then me.Evidence1.visible = True
else
me.Evidence1.visible = False
end if
and so on for Evidence2, Evidence 3, etc...
This yields a debug error upon opening the report. Is there an easier way to do this? Thanks!
Andy
Basically, here is the setup of the report:
Category Header
Category
-----------------------------------
Detail
Evidence1
Evidence2
Evidence3
Evidence4
Evidence5
Evidence6
Evidence7
Evidence8
Evidence9
Evidence10
------------------------------------
Footer
I've got a report that has fields for 10 pieces of evidence for every category. Problem is, there isn't always 10 pieces of evidence. Is there anyway to hide the fields that are blank? I've tried using VBA on the "OnOpen" of the report to say:
if me.Evidence1 <> 0 then me.Evidence1.visible = True
else
me.Evidence1.visible = False
end if
and so on for Evidence2, Evidence 3, etc...
This yields a debug error upon opening the report. Is there an easier way to do this? Thanks!
Andy
Basically, here is the setup of the report:
Category Header
Category
-----------------------------------
Detail
Evidence1
Evidence2
Evidence3
Evidence4
Evidence5
Evidence6
Evidence7
Evidence8
Evidence9
Evidence10
------------------------------------
Footer