Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Maximize command

Discussion in 'Information Technology' started by Helen, Jul 28, 2006.

  1. Helen

    Helen
    Expand Collapse
    Guest

    I have got a database which has a main page which then can open up three
    forms which have been done with command buttons. Everytime i go into the
    database my main form is not big enough i always have to maximize it. Is
    there anyway that i could run a macro in the back ground so everytime i open
    up the main page it is the size of the screen not a small page as it is quite
    annoying to do this everytime.
    Thanks
     
  2. Loading...


  3. Wayne-I-M

    Wayne-I-M
    Expand Collapse
    Guest

    Hi Helen

    This is the answer I gave to Tia a few hours ago which I think may be what
    you're looking for.

    __________________________________________

    Open the form in design view.
    Right click on the grey section of the form (below to space where you put
    your buttons, box, lists, etc)
    On the dropdown box select Event
    Select On-Open
    Click the build options (three dots on the right)
    Select Code

    You will see this

    Private Sub Form_Open(Cancel As Integer)
    End Sub


    Insert one line of code (DoCmd.Maximize)
    So that your code looks like this


    Private Sub Form_Open(Cancel As Integer)
    DoCmd.Maximize
    End Sub


    Click Save and close your form.
    When you open it again it "should" stay maximixed.


    --
    Wayne
    Manchester, England.



    "Helen" wrote:

    > I have got a database which has a main page which then can open up three
    > forms which have been done with command buttons. Everytime i go into the
    > database my main form is not big enough i always have to maximize it. Is
    > there anyway that i could run a macro in the back ground so everytime i open
    > up the main page it is the size of the screen not a small page as it is quite
    > annoying to do this everytime.
    > Thanks
    >
     
  4. Steve Schapel

    Steve Schapel
    Expand Collapse
    Guest

    Helen,

    See my response in the macros newsgroup.

    Just a hint for the future... if you feel it is important for your post
    to appear in more than one newsgroup (in practice this is seldom
    necessary), it is preferable to cross-post (address the same message
    simultaneously to both groups), rather than multi-post (send a copy of
    the message separately to each group). Thanks.

    --
    Steve Schapel, Microsoft Access MVP

    Helen wrote:
    > I have got a database which has a main page which then can open up three
    > forms which have been done with command buttons. Everytime i go into the
    > database my main form is not big enough i always have to maximize it. Is
    > there anyway that i could run a macro in the back ground so everytime i open
    > up the main page it is the size of the screen not a small page as it is quite
    > annoying to do this everytime.
    > Thanks
    >
     
  5. Helen

    Helen
    Expand Collapse
    Guest

    Thank Wayne,

    This did work when i completed it but when i closed down the data base and
    went back into it it came up with;
    The formmain Page is misspelled or refers to a form that doesnt exist. If
    the invaild form name is in a macro, an Action failed dialog box will display
    the macro name and the macro's arguments after you click ok. Open the Macro
    window and enter the correct form name.

    Any ideas what to do??

    "Wayne-I-M" wrote:

    > Hi Helen
    >
    > This is the answer I gave to Tia a few hours ago which I think may be what
    > you're looking for.
    >
    > __________________________________________
    >
    > Open the form in design view.
    > Right click on the grey section of the form (below to space where you put
    > your buttons, box, lists, etc)
    > On the dropdown box select Event
    > Select On-Open
    > Click the build options (three dots on the right)
    > Select Code
    >
    > You will see this
    >
    > Private Sub Form_Open(Cancel As Integer)
    > End Sub
    >
    >
    > Insert one line of code (DoCmd.Maximize)
    > So that your code looks like this
    >
    >
    > Private Sub Form_Open(Cancel As Integer)
    > DoCmd.Maximize
    > End Sub
    >
    >
    > Click Save and close your form.
    > When you open it again it "should" stay maximixed.
    >
    >
    > --
    > Wayne
    > Manchester, England.
    >
    >
    >
    > "Helen" wrote:
    >
    > > I have got a database which has a main page which then can open up three
    > > forms which have been done with command buttons. Everytime i go into the
    > > database my main form is not big enough i always have to maximize it. Is
    > > there anyway that i could run a macro in the back ground so everytime i open
    > > up the main page it is the size of the screen not a small page as it is quite
    > > annoying to do this everytime.
    > > Thanks
    > >
     

Share This Page