Results 1 to 7 of 7
  1. #1
    NewbyForAccess is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2015
    Posts
    49

    Footer alternating layout according to what side of duplexed page it is printed on

    Is there some sort of method I can create that will make a duplexed report print a field on opposite sides depending on if it's an even or an odd page? I have category fields where I would like the name of the category shifted from one side of the footer to the other depending on the odd or even page it's being printed on. I have no clue how to get a code written or even where to begin. Hope I can find help here. Thanks!

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    not tried it but suggest you need to you use the footer on format event

    to determine page is odd or even use some thing like

    me.page mod 2

    which will return 0 for even pages, 1 for odd pages

    then you need to shift the control using it's left property something like

    me.ctrl.left=me.ctrl.left+ (or - depending on which side they are on for a left page) amount to move in twips


    So if controls are on the left for even pages and right for odd pages and you have set them in design view on the left you can do it in one line of code

    me.ctl.left=me.ctl.left +(page mod 2)*(me.width-ctl.width-(ctl.left*2))

    this calculation works on the basis that if the left of the control is 200 twips from the left edge and when on the other side the right hand side of the control (i.e. left+width) is 200 twips from the right edge so the position is mirrored.

    You may also heed to consider adjusting the text allgn property as well

  3. #3
    NewbyForAccess is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2015
    Posts
    49
    Thanks, Ajax, I did try putting the formula into the On Filter in the report settings as that is the only place I could find the On Filter formatting option. It didn't work so maybe I'm just not sure where it goes or how to go about using it. Maybe I'm just missing something simple. Thanks for the help.

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    la into the On Filter in the report settings as that is the only place I could find the On Filter formatting option
    not sure if that is a typo, but I said on Format event of the footer section, not on filter of the report

  5. #5
    NewbyForAccess is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2015
    Posts
    49
    Oh, geesh, sorry about that. I think I was mistaken when I wrote that. I just put the code in on the footer section on the On Format, but it kicks it out saying that there's no "me" object. I'm just not sure what to do next, but I left the formula there for now. Thanks again, Ajax!

  6. #6
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    I did say 'something like' Perhaps you don't need the Me. - see this link https://docs.microsoft.com/en-us/off...s.report.pages

  7. #7
    NewbyForAccess is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Sep 2015
    Posts
    49
    I tried with and without the Me added, looked at the page you sent me to but it shows page numbers so it didn't help. I did make sure to copy and paste what you sent and have it placed in the On Format in the footer section. I've been able to figure the page numbering. However, what I'm trying to have swapped from one side of the page to the other is a category field entry that is automatically generated. It's a text field. Sure would be nice if this worked as easy as Word. Thanks, again.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 11-09-2016, 10:42 AM
  2. Force Report Footer to before Page Footer
    By Charles CL in forum Reports
    Replies: 15
    Last Post: 01-21-2016, 12:06 PM
  3. Replies: 1
    Last Post: 11-23-2015, 12:11 PM
  4. Replies: 2
    Last Post: 12-21-2013, 02:09 PM
  5. Replies: 2
    Last Post: 10-15-2013, 09:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums