Different Background position depending on the page number (1 Viewer)

Odradek

New member
Local time
Today, 12:12
Joined
Apr 30, 2022
Messages
1
Hello lovely forum,

I hope you can help me. I have a report and I have to add a picture to it. It's a stripe stretching, almost from top to bottom of the page. Easy to do, I used the picture as the background image. But here is my problem. The stripe has to be on the left if the page number is odd and on the right side of the page if the page number is even.
Maybe for reference how it should look like in the end.
Reference.JPG
 

isladogs

MVP / VIP
Local time
Today, 11:12
Joined
Jan 14, 2017
Messages
18,186
One possible solution.
Have two red stripes and make only one visible depending on whether the page number is odd or even.
Use the detail format event for this code.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 19:12
Joined
May 7, 2009
Messages
19,175
using Line method of report object.
will only work on Print Preview.
 

Attachments

  • OddEvenDivider.accdb
    672 KB · Views: 173

strive4peace

AWF VIP
Local time
Today, 06:12
Joined
Apr 3, 2020
Messages
1,003
hi Odradek

adding onto @isladogs answer ...

to more reliably reference the page number in code, create a (hidden) calculated control

Name --> PageNo
ControlSource --> =Page
 

Users who are viewing this thread

Top Bottom