How to Draw Line on Last Record

D

DOYLE60

On several reports, I'm using the following code to draw a line every 5
records.

Me.Line110.Visible = (Me!CountThem Mod 5 = 0)

I just designed a new report that is going to need to do the above but also
draw a line after the last record. How do I edit the above to do that? Thanks,

Matt
 
J

John Spencer (MVP)

I would try the following.

Me.Line110.Visible = (Me!CountThem Mod 5 = 0 or Me!CountThem = Count(*))
 
D

DOYLE60

Thanks John. But the expression below does not go in. It has problems with
the *. I tried Count() and some other things but could not fix it.

Me.Line110.Visible = (Me!CountThem Mod 5 = 0 or Me!CountThem = Count(*))

Thanks again,

Matt
 
J

John Spencer (MVP)

Ok then let's try adding an invisible control to the report. I would put that
in the Report Header so that it only gets called once.

Put a control in the header and name it TotalCount
Set its control source to =Count(*)

Then change the line to

Me.Line110.Visible = (Me!CountThem Mod 5 = 0 or Me!CountThem = Me!TotalCount)
 

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

Top