Hiding Detail in a Report

seenfresh

Well-known Member
Joined
Jul 12, 2006
Messages
1,141
How can I hide the detail in my report if the value is less than or equal to 0?

Would I use an if expression in my Query for this objective under each field?

Any advice would be great!

Thanks in advance,
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Are you talking about individual fields, or the entire detail line if one of the fields is <= 0?

If individual fields, the query would be the place, if it's the whole detail line on the report, then the OnFormat event would be the place
 
Upvote 0
Vic,

Individual Fields....


I would have to include an expression in my query correct? How might I go about this expression to actual hide the data on my report... This wouldn't actually hid my occurance of the Headings and space such field takes up on my report correct?


Thank you again for your help!!!
 
Upvote 0
where a field would go in the query grid, you would put something like this instead:
MyFieldName: IIf([MyFieldName]<=0, "", [MyFieldName])
What this does is says, if MyFieldName is less than or equal to 0, then put a string of zero length into the query, otherwise put the data itself into the query.
Of course you will need to put your own field name(s) into the statement where MyFieldName currently is.
 
Upvote 0
reply

Vic,

Thank you for your help

I guess it's not possible to have the detail and header for a field on a report not be included if value is <=0 ... by using the query expression the report will still keep any headers and the space that the detail occupies in the report.. the visible property would have to be set to No manually for each filed I desire to be exclusive from the report!

Thanks again Vic,
 
Upvote 0
SeenFresh,
I guess I missed that part of the request. I sounds like you are trying to either not show the entire detail line if one or more fields are <= zero. And I guess if a whole group of detail records add up to <= zero, then you want the whole group to not show on the report? Because both of these things are possible in Access to accomplish. Just let us know which, or both you want.
 
Upvote 0

Forum statistics

Threads
1,222,013
Messages
6,163,390
Members
451,834
Latest member
tomtownson

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top