Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2002
    Posts
    17

    Question Unanswered: How to set report MARGINS with code??

    Can somebody tell me how to set the margins of a report by code so that I don't have to change them always again when another printerdevice is choosen?

    Thanx for helping me!

    Luk

  2. #2
    Join Date
    Oct 2002
    Location
    NSW Australia
    Posts
    61

    Wink Re: How to set report MARGINS with code??

    Originally posted by Luk
    Can somebody tell me how to set the margins of a report by code so that I don't have to change them always again when another printerdevice is choosen?

    Thanx for helping me!

    Luk
    I have a module written by someone else and hacked by me which sets page orientation and sets margins (I added the margins stuff).
    It takes a little fiddling because everyones code is set up differently but it is fairly easy to follow if you are comfy with VBA.
    I have it on my home pc. Email me and I will try to send you a copy/example.
    If I remember I might post it here too.

  3. #3
    Join Date
    Sep 2002
    Posts
    17

    setup margins and page setup

    Hello,

    I am very interested in that file. If you want you can send it to my email-address: ltruyen@analyz-it.be .

    Do I need to setup specific printer drivers to run the code or doesn't it matter whichones?

    Thank you very much for your help!

    Luk

  4. #4
    Join Date
    Oct 2002
    Location
    NSW Australia
    Posts
    61

    Wink

    It reads the printer device capabilities.
    I have used it on a few systems now and it needs no alterations.
    The way the code works, it opens a report in design mode, sets any settings (predefined in code), saves it and then opens it in normal mode.
    I wish I had it here with me but alas it will have to wait until I get home (about 6 hours time).

  5. #5
    Join Date
    Sep 2002
    Posts
    17

    setup margins

    OK, can you send it then this evening?

    Onother question: In which version of access does it work? I work with Access 2000. For Access 2002 it is easy to make such a module because there you have the option: .printer. This option is not available in Access 2000.

    Thankx

  6. #6
    Join Date
    Oct 2002
    Location
    NSW Australia
    Posts
    61

    Post Margin Demo

    Here it is, I set it up so that you should be able to follow.
    Attached Files Attached Files

  7. #7
    Join Date
    Oct 2002
    Location
    NSW Australia
    Posts
    61

    Exclamation Note

    BTW this is Access97. I use it in 2000 as well though. Converts fine.
    The Paper Size is fixed as A4, in the code this = 9. For US Letter set the value to 1
    Last edited by denofdeath; 10-03-02 at 13:02.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •