Hide column if sum = 0

guinness

Registered User.
Local time
Today, 08:54
Joined
Mar 15, 2011
Messages
249
Hi folks. Me again

I have a query that shows productivity. So I have a collumn headed design that shows the amount of hours spent each week on design. A collumn headed e-Learning that shows the amount of hours spent each week on e-Learning etc. What I was wondering was if there is any way to show only the collumns with hours registered against them. So if I've not done any design then don't show the collumn at all.

Any help would be great but I am a newbie so go easy on me.
 
Re: Hide collumn if sum = 0

In your query you should look at the field you want to use and in the criteria box below it place something like Is Not Null. Is the field a text field or pure number field?
 
Re: Hide collumn if sum = 0

Hi Trevor

I'm fine writing a criteria for each collumn such as >0. The problem is that the rows are by date so if someone had no design on 01/04 but 15 hours of e-Learning work then I need to show the row for 04/01. So if someone has done no design all month then I don't need a collumn for design for that employee but if they did one hours design on 14/04 then I need the design collumn to show. In other words I want to hide the collumn only if the sum of that collumn is zero. I hope that makes sense.

Kev
 
Re: Hide collumn if sum = 0

Would you be able to upload a sample of your database so I can take a look.

Make a copy of it first, change any sensitive details and tell me which tables have the data and which queries you want me to look at. The names of the fields would be useful to.

You might end up creating another query to do a total and then add criteria to exclude 0 zero values.
 

Users who are viewing this thread

Back
Top Bottom