Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: Help

  1. #1
    Join Date
    Jul 2003
    Location
    Australia
    Posts
    217

    Unhappy Unanswered: Help

    I got a report designed for A3 paper size.

    Every time I change the design, I have to set my default printer to one which has A3 paper, so that the A3 paper size setting does not get altered.

    But when I send the database to someone else, the paper size will be reset to A4 (probably because his Default printer has NO A3).

    How can I FIX the paper size of that report to A3 ??

    Is there any VBA solution ?

  2. #2
    Join Date
    Jul 2003
    Posts
    38
    It is not a good idea to fix it to A3, cause then an user without an A3 cannot print at all. Anyway it isn't possible to fix it because Access always trys to fit it to the printer (same as any other windows program).

    But there is a property that might do what you want. You can disable the standardprinter for your report:

    reports(YOURREPORT).UseDefaultPrinter = false

    Put this in the function who opens the reoport, or in the OnOpenEvent.

    regards

  3. #3
    Join Date
    Jul 2003
    Location
    Australia
    Posts
    217

    Unhappy

    I understand your concept of flexibility.

    But in my case, there is no point to make it flexible.
    Because that report must be printed in A3 size. It is designed for that size. It won't fit in A4.

    I do not want to fix the printer name, but I do want to fix the paper size (to A3).

    So, can anybody help again ???

  4. #4
    Join Date
    Jul 2003
    Posts
    38
    You can't set up the page size of a report, as well as can't do this in Word or Excel. But you can prevent Access from automatically resize the report by using the piece of code i gave you.

  5. #5
    Join Date
    Jul 2003
    Location
    Australia
    Posts
    217

    Re: Gurus , where have you gone ??

    There must be a programmatic way to do this.

    Gurus ! Where have you all gone ??

    Gurus, where are you all hiding ??

  6. #6
    Join Date
    Apr 2003
    Location
    Manchester, NH
    Posts
    57
    Actually, if you do the sp update for access 2k you shouldn't have a problem. I have found that quite a few printing bugs exist in access 2k and the patch seems to fix all I have found.

    Dalynching

  7. #7
    Join Date
    Jul 2003
    Location
    Australia
    Posts
    217

    Using Access 97

    But I using Access 97...What about Access 97?

  8. #8
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    since you admit the possibility that a remote user will not have an A3 printer, whatever solution you find is really only for viewing the report.

    viewing is done on a screen not on a printer, so the real problem is scaling the report to fit screen width (or to sideways-scroll on a larger than screen width) ...and that is right where HTML lives.

    ?? write it all out manually as HTML?
    strHTML = "<html><head><title>whatever</title></head><body>"
    strHTML = strHTML & "<table width=""100%"">" ' or 200% or 400% or?
    strHTML = strHTML & etc etc etc etc

    it's really boring to set up, but once done, you have a report that is completely under your control and adapts to viewing on any machine.

    printing? you are no worse off than before with a user who has no A3 printer.

    izy

  9. #9
    Join Date
    Jul 2003
    Location
    Australia
    Posts
    217

    Re: help

    The user DOES have a A3 printer.

    But his PC's default printer might not have.

    So, when he opens the report, the A3 size setting will be gone.

    (Only when he prints it then he chooses the printer)

  10. #10
    Join Date
    Jun 2003
    Location
    UK
    Posts
    68
    Try this I use it to set the printer for different department depending on log in. It will need some alterations to fit your requirements.

    Private Sub cmdPrint_Click()
    Dim stDocName As String
    Dim prtDefault As Printer

    'Set the printer default

    Set Application.Printer = Application.Printers(0) ' This needs to be revised to default printer

    Set prtDefault = Application.Printer

    'Opens YourReport in preview mode and hides YourForm and then sets the reports printer to above printer
    stDocName = "YourReportName"
    DoCmd.OpenReport stDocName, acPreview, , , acWindowNormal
    Me.Visible = False
    Reports(stDocName).Printer = prtDefault

    'Set the printer tray for ClinPath Printer
    prtDefault.Duplex = acPRDPSimplex 'single sided print
    prtDefault.PaperSize = acPRPSA3 'This should set the papersize


    End Sub

  11. #11
    Join Date
    Jul 2003
    Location
    Australia
    Posts
    217
    I felt excited when I saw your reply. But when I tried out the code, it did

    not work. What package is it for ?? It's not for Access.

  12. #12
    Join Date
    Jun 2003
    Location
    UK
    Posts
    68
    Yes I use it in an Access XP database (I'll check to see if it works in 97). The Application.Printer is part of the Access library (MSACC.OLB). What part does not work ? It does need some tweeking to fit you requirements.

  13. #13
    Join Date
    Jul 2003
    Location
    Australia
    Posts
    217
    When I tried to compile, it complained that "Printer" is not a member of

    the Application object.

  14. #14
    Join Date
    Jun 2003
    Location
    UK
    Posts
    68
    Which version of Access are you using ? Also check which Access library you are referencing.

  15. #15
    Join Date
    Jul 2003
    Location
    Australia
    Posts
    217
    I'm using Access 97. What extra reference do I need to register ??

    Thanks.

Posting Permissions

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