Loop on the On Format event of a report

  • Thread starter Thread starter jeanulrich00
  • Start date Start date
J

jeanulrich00

Hi

On a report I have 38 fields Named [AP1], [AP2], [AP3], ......till
[AP38]

As I don't want to see field when to value = 0 (zero), On the On
Format of the Detail of the report I need to put
the following code

Me.AP1.visible = (me.AP1>0)
Me.AP2.visible = (me.AP2>0)
Me.AP3.visible = (me.AP3>0)
Me.AP4.visible = (me.AP4>0) and so on 38 times.

I am lookig for something to simplify the code. Maybe something that
would make a loop. But as I am not familiar with routine like that, i
would need help

thanks
 
Have you looked in Help at the CanShrink property? That may be an easy
approach to accomplishing your purpose.

Larry Linson
Microsoft Office Access MVP
 
Have you looked in Help at the CanShrink property?  That may be an easy
approach to accomplishing your purpose.

 Larry Linson
 Microsoft Office Access MVP




On a report I have 38 fields Named [AP1], [AP2], [AP3], ......till
[AP38]
As I don't want to see field when to value = 0 (zero), On the On
Format of the Detail of the report I need to put
the following code
Me.AP1.visible = (me.AP1>0)
Me.AP2.visible = (me.AP2>0)
Me.AP3.visible = (me.AP3>0)
Me.AP4.visible = (me.AP4>0)   and so on 38 times.
I am lookig for something to simplify the code.  Maybe something that
would make a loop.  But as I am not familiar with routine like that, i
would need help
thanks- Hide quoted text -

- Show quoted text -

Hi

I have try the Can Shrink but it is not working as the field shrink
just a bit and not completely

so I am back with the first method. I realy need to make a loop with
the code that works

Me.AP1.visible = (me.AP1>0)
and do that for the 38 fields

So I am still waiting for help

thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top