Welcome to SPN

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

Sign Up Now!
  1. Guest ji, please consider donating today!   Become a Supporter    ::   Make a Contribution   
    Monthly (Recurring) Target: $300 :: Achieved: $95

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
    > >
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page