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

Odradek

New member
Local time
Today, 23:58
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

CID VIP
Local time
Today, 22:58
Joined
Jan 14, 2017
Messages
16,412
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
Tomorrow, 05:58
Joined
May 7, 2009
Messages
16,826
using Line method of report object.
will only work on Print Preview.
 

Attachments

  • OddEvenDivider.accdb
    672 KB · Views: 107

strive4peace

AWF VIP
Local time
Today, 16:58
Joined
Apr 3, 2020
Messages
922
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