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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reduce size of report detail if no data

Status
Not open for further replies.

48Highlander

Technical User
Feb 8, 2004
119
CA
My report has two lines of data: the first line will always appear. The second line is a memo field that I want to appear only where there is something in the field. If there is nothing in the memo field, I want the size of the detail portion of the report to be reduced so that only one line is displayed.

I have set the 'can shrink' property of the memo field to Yes and the 'can shrink' property of the Detail section to Yes but some space is still showing where the memo field is.

Anyone any ideas how I can fix this?

Bill J
 
You could create a subreport for the memo; if it was blank it simply would not show.

All I ask is a chance to prove that money can’t make me happy.
 
Do you have a label control in the section that is keeping the section from shrinking? I expect there is some control to the left or right of the memo text box that doesn't allow the section to shrink as you want it to.

Duane
Hook'D on Access
MS Access MVP
 
Thanks guys. There is nothing to the left right or below the memo field. I have tried using a subreport in the past but the framework is still there even if there are no records in the subreport. Am I missing something?

Bill J
 
If you group the report by data item, you can put the memo in the group footer. Then interrogate its HasData property and set cancel = true in the format event if there is no data.

All I ask is a chance to prove that money can’t make me happy.
 
I would try set some background colors of the memo text box as well as the section to see what is actually causing your problem. It's hard to diagnosis what can't be seen.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top