Startup option questions

freddienet

Registered User.
Local time
Yesterday, 19:40
Joined
Jun 4, 2004
Messages
23
1. I have been able to hide all menu's on startup with the exception of the menu bar. Any suggestions?

2. I would like to maximize the size of the forms when they start after clicked from the switchboard. Any suggestions?

3. I have inserted a close button on the switchboard (used option in switchboard set up) that closes application but the button just closes the switchboard and not Access. Any suggestions?

Any help would be appreciated


Freddie
 
Last edited:
Hi

Can't help with all but I think what you may want is under tool - start up and if you uncheck all the boxes relating to toolbars expect Allow Default Shortcut Menus... you users get very limited menus to use

However if this is not what your after, try doing a search on custom tool bars there bit quite a bit on this....
 
1)
Code:
DoCmd.ShowToolbar "Menu Bar", acToolbarNo

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

3)
Code:
Application.Quit

This might interest you... Hide all Access Toolbars and Menubars
 
Last edited:
There are two ways to maximise a window. one is macro the other is to use Visual Basic. I do not know if you know VB, so I will show you how to do it in macros.

1) create a macro, and save as "mac_Maximize". right click and go into design view

2) in the macros window looks like a table with three columns. under the action field heading, click on the top cell and you will find a drop down arrow on the right of the cell, click on this and choose "Maximise". save again

3) in each form that you want to open maximised, go into design view, and open the properties box and, there should be a drop down menu (the contents of this combo box changes as you click on object in your form). click on this and choose "form"

4) click on "Events" tab. then find "OnLoad"

5) Click on field in next to "OnLoad", the drop down arrow appears, click on this and choose "Maximise".

6) close the properties box, save and test. then rock and roll.

as for the switchboard, I find it messy. what I do is create a form called Control panel. then I add all the buttons that I choose including a quit button.

the close application in the wizard when creating a command button does not save what ever the user was doing, therefore not practical.

It has been a while since I have even seen the switchboard thing, but I do know that it uses Visual basic and puts in it's own code (if you make a mistake and there is an error, you are up s#!t creek because you have to sift though all the code) this is different if you write your own code, you know where you stand, because you wrote it yourself.

To make a button that Quits the the entire database, you can make another macro, this time call it:

"mac_Quit_Database"

1) Right click on the macro icon as before and choose Design View.

2) same as before but choose the action "Quit". My advise is to leave the default on the "options" at the bottom of the screen at "SaveAll"

3) make your button if you have not already done so using the toolbox toobar.

4) right click on this button and choose the "properties..."

5) choose the event tab and go down to "OnClick" and in the text box next to this, choose "mac_Quit_Database" on the drop down list. and your done.

Good Luck,

Scott
 
Last edited:
Thank you

Thank you,

Freddie

smercer said:
There are two ways to maximise a window. one is macro the other is to use Visual Basic. I do not know if you know VB, so I will show you how to do it in macros.

1) create a macro, and save as "mac_Maximize". right click and go into design view

2) in the macros window looks like a table with three columns. under the action field heading, click on the top cell and you will find a drop down arrow on the right of the cell, click on this and choose "Maximise". save again

3) in each form that you want to open maximised, go into design view, and open the properties box and, there should be a drop down menu (the contents of this combo box changes as you click on object in your form). click on this and choose "form"

4) click on "Events" tab. then find "OnLoad"

5) Click on field in next to "OnLoad", the drop down arrow appears, click on this and choose "Maximise".

6) close the properties box, save and test. then rock and roll.

as for the switchboard, I find it messy. what I do is create a form called Control panel. then I add all the buttons that I choose including a quit button.

the close application in the wizard when creating a command button does not save what ever the user was doing, therefore not practical.

It has been a while since I have even seen the switchboard thing, but I do know that it uses Visual basic and puts in it's own code (if you make a mistake and there is an error, you are up s#!t creek because you have to sift though all the code) this is different if you write your own code, you know where you stand, because you wrote it yourself.

To make a button that Quits the the entire database, you can make another macro, this time call it:

"mac_Quit_Database"

1) Right click on the macro icon as before and choose Design View.

2) same as before but choose the action "Quit". My advise is to leave the default on the "options" at the bottom of the screen at "SaveAll"

3) make your button if you have not already done so using the toolbox toobar.

4) right click on this button and choose the "properties..."

5) choose the event tab and go down to "OnClick" and in the text box next to this, choose "mac_Quit_Database" on the drop down list. and your done.

Good Luck,

Scott
 
I've used the above macro, and it works a treat, thanks.

But what if I only want the form that I set the maximise macro to run upon load to appear maximised. When I open other forms they are opening maximised, how can I stop this?

Thanks.
 
In the forms OnOpen event you need to restore the form.

Code:
DoCmd.Restore
 
it might be better to explain my situation.

I have a main menu, which I want to always stay open, and always stay maximised.

When I use the restore function, it turns all the forms back.

Is there anyway to set the main menu's size to default to maximised?
 
I tend to put this in my form's modules. And then cycle through the forms if I want to set specific ones to a certain state.

In your form's module.
Code:
Private mMaximised As Boolean
Public Property Get Maximised() As Boolean
    Maximised = mMaximised
End Property

Public Property Let Maximised(boo As Boolean)
    mMaximised = boo
    If mMaximised Then
        DoCmd.Maximize
    Else
        DoCmd.Restore
    End If
End Property

Private Sub Form_Open(Cancel As Integer)
    Me.Maximised = True
End Sub
 
Apologies, but I am an Access beginner and not sure what you mean below.

I used macros, rather than a module for the Maximise and Restore functions.

SJ McAbney said:
I tend to put this in my form's modules. And then cycle through the forms if I want to set specific ones to a certain state.

In your form's module.
Code:
Private mMaximised As Boolean
Public Property Get Maximised() As Boolean
    Maximised = mMaximised
End Property

Public Property Let Maximised(boo As Boolean)
    mMaximised = boo
    If mMaximised Then
        DoCmd.Maximize
    Else
        DoCmd.Restore
    End If
End Property

Private Sub Form_Open(Cancel As Integer)
    Me.Maximised = True
End Sub
 
Sorry, made a mistake. What I was suggesting only works because I prefer to keep only one form visible at all times.
 
You can easily force the size of a form when needed. You will have to use VBA and the result is a custom fit for the size of your forms.

Here is some code I use in the forms OnOpen event to force my forms to the size I want...

Code:
'    MsgBox "InsideHeight = " & InsideHeight & vbCrLf & vbLf & "InsideWidth = " & InsideWidth 'used for testing
    InsideHeight = 5000 'twips
    InsideWidth = 6000 'twips

You can also use the MoveSize method to set the size and postion the form in one line of code.

Code:
DoCmd.MoveSize 1440, 2400, 1000, 2000

Check the Access help files for more info on using the InsideWidth & MoveSize commands.
 
jempie said:
it might be better to explain my situation.

I have a main menu, which I want to always stay open, and always stay maximised.

When I use the restore function, it turns all the forms back.

Is there anyway to set the main menu's size to default to maximised?
Jempie, How about if you set the POPUP property of your another form that you want to open from main menu to YES. It can keep your main form to maximize size while you open another form as pop up form.
:cool:
 
Wild Horse said:
Jempie, How about if you set the POPUP property of your another form that you want to open from main menu to YES. It can keep your main form to maximize size while you open another form as pop up form.
:cool:

that's exactly what I'm after. Thanks! :)
 

Users who are viewing this thread

Back
Top Bottom