Report Size

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Don

    #1

    Report Size

    Is there a way to have my report open up in a size that is completely
    viewable. For instance, I have a report that when it opens up (100%) I have
    to scroll from side to side to see all the data. Is there a way to have
    this report open up, say, 75% and is there a way to make it centered?
    The only way I can do this now is to go to the "View" tab and choose 75%,
    then adjust side to side to get it centered.
    Can this be done automatically?
    Thanks,
    Don..........


  • Lyle Fairfield

    #2
    Re: Report Size

    ZoomControl is a hidden property of reports and forms.
    The value assigned is the per cent of "zoom" wanted.
    Zero maps to "size to fit".

    example:

    With DoCmd
    .OpenReport "rptActualOrgan izationandStaff ing", acViewPreview
    .Maximize
    End With
    Reports("rptAct ualOrganization andStaffing").Z oomControl = 0

    Comment

    • Don

      #3
      Re: Report Size

      I believe I understand what your saying but I don't understand how I write
      this. If my report is called Monthly Report would it look like this?

      DoCmd.OpenRepor t "Monthly Report", acViewPreview
      DoCmd.Maximize

      After this I'm totally lost.
      Don........



      "Lyle Fairfield" <lylefairfield@ aim.com> wrote in message
      news:1137942220 .785992.31660@o 13g2000cwo.goog legroups.com...[color=blue]
      > ZoomControl is a hidden property of reports and forms.
      > The value assigned is the per cent of "zoom" wanted.
      > Zero maps to "size to fit".
      >
      > example:
      >
      > With DoCmd
      > .OpenReport "rptActualOrgan izationandStaff ing", acViewPreview
      > .Maximize
      > End With
      > Reports("rptAct ualOrganization andStaffing").Z oomControl = 0
      >[/color]


      Comment

      • Lyle Fairfield

        #4
        Re: Report Size

        One would put this in a standard module.
        (Air code)

        Public Function OpenMonthlyRepo rt()

        With DoCmd
        .OpenReport "Monthly Report", acViewPreview
        .Maximize
        End With
        Reports("Monthl y Report").ZoomCo ntrol = 0

        End Function

        One would then "call" the Function. My preference would be from a
        Custom Menu Bar Control. Alternatives would be from a Macro, or from a
        Command Button, or in some other code.

        Note, that a Sub cannot be called from a Macro, nor from a Menu
        Control.

        Comment

        • Don

          #5
          Re: Report Size

          Lyle,
          Unfortunately I don't understand any of what you are trying to tell me.
          Don............ .
          "Lyle Fairfield" <lylefairfield@ aim.com> wrote in message
          news:1137951528 .683526.31320@g 49g2000cwa.goog legroups.com...[color=blue]
          > One would put this in a standard module.
          > (Air code)
          >
          > Public Function OpenMonthlyRepo rt()
          >
          > With DoCmd
          > .OpenReport "Monthly Report", acViewPreview
          > .Maximize
          > End With
          > Reports("Monthl y Report").ZoomCo ntrol = 0
          >
          > End Function
          >
          > One would then "call" the Function. My preference would be from a
          > Custom Menu Bar Control. Alternatives would be from a Macro, or from a
          > Command Button, or in some other code.
          >
          > Note, that a Sub cannot be called from a Macro, nor from a Menu
          > Control.
          >[/color]


          Comment

          • Steve

            #6
            Re: Report Size

            Don -

            A 12-step program for using Lyle's code.
            1. Create a new form.
            2. Place a new button on your new form.
            3. Right-click the button and choose 'Build event...'.
            4. Choose 'Code Builder'.
            5. Paste this between "Private Sub" and "End Sub" :
            OpenMonthlyRepo rt()
            6. Place your cursor after "End Sub"
            7. Paste Lyle's code.
            8. Save (Ctrl + S).
            9. Close the Visual Basic Environment window that you're in, using the
            red X in the right-hand corner.
            10. When you're back at your new form in Design view, hit F5 to run the
            form.
            11. Click the button.
            12. View the report.

            Comment

            Working...