If you couldn't find the report's Page event procedure, that
line of code would be meaningless. So putting it anywhere
else could not possibly do anything useful.
Open the report in design view.
Use the View menu and select Properties.
In Report properties, select the Event tab.
Look down the list and click on the On Page property.
Select Event Procedure from the drop down list at the right
side of the property.
Then click on the builder button [...] to the right of the
drop list.
Paste the line of code:
Me.Line (0,lngPos)-Step(Me.Width,0)
into the event procedure.
Go back to the report's design view and click on the gray
Detail bar.
Go to the Detail properties window.
Select the Event tab.
Look down the list and click on the On Peint property.
Select Event Procedure from the drop down list at the right
side of the property.
Then click on the builder button [...] to the right of the
drop list.
Paste the line of code:
lngPos = Me.Top + Me.Height
into the event procedure.
Use the Drop down list at the top left side of the module
and select (General)
Add the line:
Private lngPos As Long
after the:
Option Compare Database
Option Explicit
lines. If those are not the first two lines in the module's
General section (blank lines don't matter), fix it so they
are.
Use the Debug menu and select Compile.
If there are no error messages, then switch the report to
Print Preview and see if you get a line in the right place.
--
Marsh
MVP [MS Access]
I cannot get it working, no line appear below the last record. I am also not
able to find the Page event.