Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove object from report

Status
Not open for further replies.

proggybilly

Programmer
Apr 30, 2008
110
US
Hey all,
I have a report that I have designed that has a graph/subform that displays and shows growth over years. Problem is when there is only one year in the record, i do not want this form to appear. I have resolved that by doing:
Code:
 dim cnt
 cnt = dcount ("[n04]", "rptD_2")
 if cnt = 1 then
  Me![Child81].Visible = False
 end if
Problem two is that when this is done, the object remains and is invisible, the data than then displays before that has this huge gap between it and the report title at the top.

What i am looking to do is to remove the object child81 completely and then on close, undo the proceedure and not save.

My application that I designed opens a series of reports in AcViewNormal so that it prints out immediately.

Can anyone help? If you need more information just ask.
 
set control highte to 0
can grow to yes

and place the control right below the chart

sow when there is no data it will shrink
 
set control highte to 0
can grow to yes

and place the control right below the chart

so when there is no data it will shrink
 
Set control height of the subform I assume... Ok I'll give that a try.
 
Did not work, unless I was doing it wrong, i added more data and it did not grow.
 
got it!

basically said that if only a single data reference

me.child81.height = 0
reportheader.height = .25

Makes it look loads better.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top