Maximize command

G

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
 
G

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.
 
S

Steve Schapel

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.
 
G

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??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top