Maximizing Access Report From VB

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

    #1

    Maximizing Access Report From VB

    This is my first try at running Access Report by Visual Basic

    I have the following code in my button press event:

    ' 2 - Show print preview
    objAccess.DoCmd .OpenReport "Invoices", 2, ,
    "[Invoice_Summary].[InvoiceNumber]=" & _
    intCurrentInvoi ce

    objAccess.DoCmd .Maximize


    The result is that the Access application is not maximized but the
    report inside it is. The application takes up about two thirds of the
    screen. Then, if I maximize the application window, everything is
    fine.

    I would like everything to be max when the user sees it.

    How can I maximize the Access application as well as the report inside
    it.

    Thanks.

    Bill
  • salad

    #2
    Re: Maximizing Access Report From VB

    Newbie wrote:[color=blue]
    > This is my first try at running Access Report by Visual Basic
    >
    > I have the following code in my button press event:
    >
    > ' 2 - Show print preview
    > objAccess.DoCmd .OpenReport "Invoices", 2, ,
    > "[Invoice_Summary].[InvoiceNumber]=" & _
    > intCurrentInvoi ce
    >
    > objAccess.DoCmd .Maximize
    >
    >
    > The result is that the Access application is not maximized but the
    > report inside it is. The application takes up about two thirds of the
    > screen. Then, if I maximize the application window, everything is
    > fine.
    >
    > I would like everything to be max when the user sees it.
    >
    > How can I maximize the Access application as well as the report inside
    > it.
    >
    > Thanks.
    >
    > Bill[/color]

    Howody, to all the others in this crosspost. Anyway....

    Normally, in the Access Report's OnOpen event I have the following line
    DoCmd.Maximize
    if I want to open the report maximized.

    I don't know if this will help you but....


    This shows how to open an app in min/max/normal modes using an API call.
    I don't see you opening the app anywhere, but if the app is opened in
    a maximized state, I'm sure the report would be displayed correctly in a
    maximized state. Maybe you need to do something with a WinAPI call.

    Also, check out Shell() in VB. It too has a window state to open an app
    in the window style you specify.

    Comment

    • Newbie

      #3
      Re: Maximizing Access Report From VB

      On Sat, 07 Jan 2006 05:00:08 GMT, salad <oil@vinegar.co m> wrote:
      [color=blue]
      >Howody, to all the others in this crosspost. Anyway....[/color]

      What's wrong with posting to more than one group as long as it's on
      the same message?

      Thanks for your answer to my question. It was very helpful.

      Comment

      • Tim Marshall

        #4
        Re: Maximizing Access Report From VB

        Newbie wrote:
        [color=blue]
        > What's wrong with posting to more than one group as long as it's on
        > the same message?[/color]

        Hi there,

        There's nothing wrong with doing so. However, if you are talking about
        Access and are doing your work in it, you're using VBA, not VB, which
        would make the two vb groups not really relevant to your question.

        8)
        --
        Tim http://www.ucs.mun.ca/~tmarshal/
        ^o<
        /#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
        /^^ "What's UP, Dittoooooo?" - Ditto

        Comment

        Working...