Custom Toolbar - Close Form to Maximized Switchboard

G

Guest

I've created a custom toolbar with 'Close' on it so that when you open a
report from a switchboard, you can click on 'Close' and return to the
switchboard. The problem I've encountered is that the switchboard isn't
maximized and I can't find the proper place to include the maximize code line.
 
G

Guest

Okay, I'm lost. I know where the On Got Focus is, but I don't know what event
procedure to input. Is that where you meant?

I used the DoCmd.Maximize in the code for the form for below:

Private Sub Form_Open(Cancel As Integer)
' Minimize the database window and initialize the form.

' Move to the switchboard page that is marked as the default.
Me.Filter = "[ItemNumber] = 0 AND [Argument] = 'Default' "
Me.FilterOn = True
DoCmd.Maximize

End Sub

I don't know if there's another Sub that should have that line added.
--
Thanks!
-Pat


Douglas J Steele said:
Best place would probably be in the form's GotFocus event.
 
D

Douglas J Steele

When you're in the form's module in the VB Editor, select Form in the
left-hand combo box at the top of the module, and GotFocus in the right-hand
combo. That should result in the following stub being created for you:

Private Sub Form_GotFocus()

End Sub

Just put your DoCmd.Maximize in that module:

Private Sub Form_GotFocus()

DoCmd.Maximize

End Sub


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


PB said:
Okay, I'm lost. I know where the On Got Focus is, but I don't know what event
procedure to input. Is that where you meant?

I used the DoCmd.Maximize in the code for the form for below:

Private Sub Form_Open(Cancel As Integer)
' Minimize the database window and initialize the form.

' Move to the switchboard page that is marked as the default.
Me.Filter = "[ItemNumber] = 0 AND [Argument] = 'Default' "
Me.FilterOn = True
DoCmd.Maximize

End Sub

I don't know if there's another Sub that should have that line added.
 
G

Guest

Your instructions were perfect - the sub appeared just as you said and I
added the DoCmd.Maximize. The Switchboard still isn't maxed when I use the
'close' option on the toolbar, though.

Is there another command I should use instead of that one?

I really appreciate your help!
--
Thanks!
-Pat


Douglas J Steele said:
When you're in the form's module in the VB Editor, select Form in the
left-hand combo box at the top of the module, and GotFocus in the right-hand
combo. That should result in the following stub being created for you:

Private Sub Form_GotFocus()

End Sub

Just put your DoCmd.Maximize in that module:

Private Sub Form_GotFocus()

DoCmd.Maximize

End Sub


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


PB said:
Okay, I'm lost. I know where the On Got Focus is, but I don't know what event
procedure to input. Is that where you meant?

I used the DoCmd.Maximize in the code for the form for below:

Private Sub Form_Open(Cancel As Integer)
' Minimize the database window and initialize the form.

' Move to the switchboard page that is marked as the default.
Me.Filter = "[ItemNumber] = 0 AND [Argument] = 'Default' "
Me.FilterOn = True
DoCmd.Maximize

End Sub

I don't know if there's another Sub that should have that line added.
--
Thanks!
-Pat


Douglas J Steele said:
Best place would probably be in the form's GotFocus event.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I've created a custom toolbar with 'Close' on it so that when you open a
report from a switchboard, you can click on 'Close' and return to the
switchboard. The problem I've encountered is that the switchboard isn't
maximized and I can't find the proper place to include the maximize code
line.
 
D

Douglas J Steele

Take a look at the properties for the form and make sure that the On Got
Focus property has [Event Procedure] as its value. (Make sure you're looking
at the properties of the form, and not just a control on it)

What's the actual code associated with your Close button?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


PB said:
Your instructions were perfect - the sub appeared just as you said and I
added the DoCmd.Maximize. The Switchboard still isn't maxed when I use the
'close' option on the toolbar, though.

Is there another command I should use instead of that one?

I really appreciate your help!
--
Thanks!
-Pat


Douglas J Steele said:
When you're in the form's module in the VB Editor, select Form in the
left-hand combo box at the top of the module, and GotFocus in the right-hand
combo. That should result in the following stub being created for you:

Private Sub Form_GotFocus()

End Sub

Just put your DoCmd.Maximize in that module:

Private Sub Form_GotFocus()

DoCmd.Maximize

End Sub


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


PB said:
Okay, I'm lost. I know where the On Got Focus is, but I don't know
what
event
procedure to input. Is that where you meant?

I used the DoCmd.Maximize in the code for the form for below:

Private Sub Form_Open(Cancel As Integer)
' Minimize the database window and initialize the form.

' Move to the switchboard page that is marked as the default.
Me.Filter = "[ItemNumber] = 0 AND [Argument] = 'Default' "
Me.FilterOn = True
DoCmd.Maximize

End Sub

I don't know if there's another Sub that should have that line added.
--
Thanks!
-Pat


:

Best place would probably be in the form's GotFocus event.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I've created a custom toolbar with 'Close' on it so that when you
open
a
report from a switchboard, you can click on 'Close' and return to the
switchboard. The problem I've encountered is that the switchboard isn't
maximized and I can't find the proper place to include the
maximize
code
 
G

Guest

[Event Procedure] is in the On Got Focus slot.

I made a customized toolbar for the 'Close' and 'Spell Check' buttons - just
pulled 'Close' off the File category on the command tab. Would it make any
difference if it was a Menu Bar or Pop Up instead? Docking is 'Allow Any'.
--
Thanks!
-Pat


Douglas J Steele said:
Take a look at the properties for the form and make sure that the On Got
Focus property has [Event Procedure] as its value. (Make sure you're looking
at the properties of the form, and not just a control on it)

What's the actual code associated with your Close button?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


PB said:
Your instructions were perfect - the sub appeared just as you said and I
added the DoCmd.Maximize. The Switchboard still isn't maxed when I use the
'close' option on the toolbar, though.

Is there another command I should use instead of that one?

I really appreciate your help!
--
Thanks!
-Pat


Douglas J Steele said:
When you're in the form's module in the VB Editor, select Form in the
left-hand combo box at the top of the module, and GotFocus in the right-hand
combo. That should result in the following stub being created for you:

Private Sub Form_GotFocus()

End Sub

Just put your DoCmd.Maximize in that module:

Private Sub Form_GotFocus()

DoCmd.Maximize

End Sub


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Okay, I'm lost. I know where the On Got Focus is, but I don't know what
event
procedure to input. Is that where you meant?

I used the DoCmd.Maximize in the code for the form for below:

Private Sub Form_Open(Cancel As Integer)
' Minimize the database window and initialize the form.

' Move to the switchboard page that is marked as the default.
Me.Filter = "[ItemNumber] = 0 AND [Argument] = 'Default' "
Me.FilterOn = True
DoCmd.Maximize

End Sub

I don't know if there's another Sub that should have that line added.
--
Thanks!
-Pat


:

Best place would probably be in the form's GotFocus event.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I've created a custom toolbar with 'Close' on it so that when you open
a
report from a switchboard, you can click on 'Close' and return to the
switchboard. The problem I've encountered is that the switchboard
isn't
maximized and I can't find the proper place to include the maximize
code
line.
 
D

Douglas J Steele

Sorry, I don't understand your comment that you "just pulled 'Close' off the
File category on the command tab". How does that return you to the
switchboard?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


PB said:
[Event Procedure] is in the On Got Focus slot.

I made a customized toolbar for the 'Close' and 'Spell Check' buttons - just
pulled 'Close' off the File category on the command tab. Would it make any
difference if it was a Menu Bar or Pop Up instead? Docking is 'Allow Any'.
--
Thanks!
-Pat


Douglas J Steele said:
Take a look at the properties for the form and make sure that the On Got
Focus property has [Event Procedure] as its value. (Make sure you're looking
at the properties of the form, and not just a control on it)

What's the actual code associated with your Close button?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


PB said:
Your instructions were perfect - the sub appeared just as you said and I
added the DoCmd.Maximize. The Switchboard still isn't maxed when I use the
'close' option on the toolbar, though.

Is there another command I should use instead of that one?

I really appreciate your help!
--
Thanks!
-Pat


:

When you're in the form's module in the VB Editor, select Form in the
left-hand combo box at the top of the module, and GotFocus in the right-hand
combo. That should result in the following stub being created for you:

Private Sub Form_GotFocus()

End Sub

Just put your DoCmd.Maximize in that module:

Private Sub Form_GotFocus()

DoCmd.Maximize

End Sub


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Okay, I'm lost. I know where the On Got Focus is, but I don't know what
event
procedure to input. Is that where you meant?

I used the DoCmd.Maximize in the code for the form for below:

Private Sub Form_Open(Cancel As Integer)
' Minimize the database window and initialize the form.

' Move to the switchboard page that is marked as the default.
Me.Filter = "[ItemNumber] = 0 AND [Argument] = 'Default' "
Me.FilterOn = True
DoCmd.Maximize

End Sub

I don't know if there's another Sub that should have that line added.
--
Thanks!
-Pat


:

Best place would probably be in the form's GotFocus event.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I've created a custom toolbar with 'Close' on it so that when
you
open
a
report from a switchboard, you can click on 'Close' and return
to
the
switchboard. The problem I've encountered is that the switchboard
isn't
maximized and I can't find the proper place to include the maximize
code
line.
 
G

Guest

I'm sorry I wasn't clear. When I created the custom toolbar, I just used the
'Close' button from the file category.

The custom toolbar is seen on the report. When you open the db, you go to
the first switchboard (maximized). You select the Reports switchboard
(maximized), then select a report. When you close the report using the
'Close' on the custom toolbar it returns you to the Reports switchboard (not
maximized).

The switchboards are maximized when you exit out of a form or flip between
switchboards, but not when you 'Close' a report.
--
Thanks!
-Pat


Douglas J Steele said:
Sorry, I don't understand your comment that you "just pulled 'Close' off the
File category on the command tab". How does that return you to the
switchboard?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


PB said:
[Event Procedure] is in the On Got Focus slot.

I made a customized toolbar for the 'Close' and 'Spell Check' buttons - just
pulled 'Close' off the File category on the command tab. Would it make any
difference if it was a Menu Bar or Pop Up instead? Docking is 'Allow Any'.
--
Thanks!
-Pat


Douglas J Steele said:
Take a look at the properties for the form and make sure that the On Got
Focus property has [Event Procedure] as its value. (Make sure you're looking
at the properties of the form, and not just a control on it)

What's the actual code associated with your Close button?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Your instructions were perfect - the sub appeared just as you said and I
added the DoCmd.Maximize. The Switchboard still isn't maxed when I use the
'close' option on the toolbar, though.

Is there another command I should use instead of that one?

I really appreciate your help!
--
Thanks!
-Pat


:

When you're in the form's module in the VB Editor, select Form in the
left-hand combo box at the top of the module, and GotFocus in the
right-hand
combo. That should result in the following stub being created for you:

Private Sub Form_GotFocus()

End Sub

Just put your DoCmd.Maximize in that module:

Private Sub Form_GotFocus()

DoCmd.Maximize

End Sub


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Okay, I'm lost. I know where the On Got Focus is, but I don't know
what
event
procedure to input. Is that where you meant?

I used the DoCmd.Maximize in the code for the form for below:

Private Sub Form_Open(Cancel As Integer)
' Minimize the database window and initialize the form.

' Move to the switchboard page that is marked as the default.
Me.Filter = "[ItemNumber] = 0 AND [Argument] = 'Default' "
Me.FilterOn = True
DoCmd.Maximize

End Sub

I don't know if there's another Sub that should have that line added.
--
Thanks!
-Pat


:

Best place would probably be in the form's GotFocus event.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I've created a custom toolbar with 'Close' on it so that when you
open
a
report from a switchboard, you can click on 'Close' and return to
the
switchboard. The problem I've encountered is that the switchboard
isn't
maximized and I can't find the proper place to include the
maximize
code
line.
 
D

Douglas J Steele

I assume that the report isn't maximized, which "unmaximizes" everything
else.

What happens when you click on the switchboard? It should maximize.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


PB said:
I'm sorry I wasn't clear. When I created the custom toolbar, I just used the
'Close' button from the file category.

The custom toolbar is seen on the report. When you open the db, you go to
the first switchboard (maximized). You select the Reports switchboard
(maximized), then select a report. When you close the report using the
'Close' on the custom toolbar it returns you to the Reports switchboard (not
maximized).

The switchboards are maximized when you exit out of a form or flip between
switchboards, but not when you 'Close' a report.
--
Thanks!
-Pat


Douglas J Steele said:
Sorry, I don't understand your comment that you "just pulled 'Close' off the
File category on the command tab". How does that return you to the
switchboard?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


PB said:
[Event Procedure] is in the On Got Focus slot.

I made a customized toolbar for the 'Close' and 'Spell Check'
buttons -
just
pulled 'Close' off the File category on the command tab. Would it make any
difference if it was a Menu Bar or Pop Up instead? Docking is 'Allow Any'.
--
Thanks!
-Pat


:

Take a look at the properties for the form and make sure that the On Got
Focus property has [Event Procedure] as its value. (Make sure you're looking
at the properties of the form, and not just a control on it)

What's the actual code associated with your Close button?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Your instructions were perfect - the sub appeared just as you said
and
I
added the DoCmd.Maximize. The Switchboard still isn't maxed when I
use
the
'close' option on the toolbar, though.

Is there another command I should use instead of that one?

I really appreciate your help!
--
Thanks!
-Pat


:

When you're in the form's module in the VB Editor, select Form
in
the
left-hand combo box at the top of the module, and GotFocus in the
right-hand
combo. That should result in the following stub being created
for
you:
Private Sub Form_GotFocus()

End Sub

Just put your DoCmd.Maximize in that module:

Private Sub Form_GotFocus()

DoCmd.Maximize

End Sub


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Okay, I'm lost. I know where the On Got Focus is, but I don't know
what
event
procedure to input. Is that where you meant?

I used the DoCmd.Maximize in the code for the form for below:

Private Sub Form_Open(Cancel As Integer)
' Minimize the database window and initialize the form.

' Move to the switchboard page that is marked as the default.
Me.Filter = "[ItemNumber] = 0 AND [Argument] = 'Default' "
Me.FilterOn = True
DoCmd.Maximize

End Sub

I don't know if there's another Sub that should have that line added.
--
Thanks!
-Pat


:

Best place would probably be in the form's GotFocus event.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I've created a custom toolbar with 'Close' on it so that
when
you
open
a
report from a switchboard, you can click on 'Close' and
return
to
the
switchboard. The problem I've encountered is that the switchboard
isn't
maximized and I can't find the proper place to include the
maximize
code
line.
 
G

Guest

When you open the first report, it is maximized. When you close out the other
reports are not maximized (though the min/max button is active on the report).

Clicking on the switchboard does nothing. I tried closing the report using
the File, Close on the Menu Bar and got the same results.
--
Thanks!
-Pat


Douglas J Steele said:
I assume that the report isn't maximized, which "unmaximizes" everything
else.

What happens when you click on the switchboard? It should maximize.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


PB said:
I'm sorry I wasn't clear. When I created the custom toolbar, I just used the
'Close' button from the file category.

The custom toolbar is seen on the report. When you open the db, you go to
the first switchboard (maximized). You select the Reports switchboard
(maximized), then select a report. When you close the report using the
'Close' on the custom toolbar it returns you to the Reports switchboard (not
maximized).

The switchboards are maximized when you exit out of a form or flip between
switchboards, but not when you 'Close' a report.
--
Thanks!
-Pat


Douglas J Steele said:
Sorry, I don't understand your comment that you "just pulled 'Close' off the
File category on the command tab". How does that return you to the
switchboard?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


[Event Procedure] is in the On Got Focus slot.

I made a customized toolbar for the 'Close' and 'Spell Check' buttons -
just
pulled 'Close' off the File category on the command tab. Would it make any
difference if it was a Menu Bar or Pop Up instead? Docking is 'Allow Any'.
--
Thanks!
-Pat


:

Take a look at the properties for the form and make sure that the On Got
Focus property has [Event Procedure] as its value. (Make sure you're
looking
at the properties of the form, and not just a control on it)

What's the actual code associated with your Close button?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Your instructions were perfect - the sub appeared just as you said and
I
added the DoCmd.Maximize. The Switchboard still isn't maxed when I use
the
'close' option on the toolbar, though.

Is there another command I should use instead of that one?

I really appreciate your help!
--
Thanks!
-Pat


:

When you're in the form's module in the VB Editor, select Form in
the
left-hand combo box at the top of the module, and GotFocus in the
right-hand
combo. That should result in the following stub being created for
you:

Private Sub Form_GotFocus()

End Sub

Just put your DoCmd.Maximize in that module:

Private Sub Form_GotFocus()

DoCmd.Maximize

End Sub


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Okay, I'm lost. I know where the On Got Focus is, but I don't know
what
event
procedure to input. Is that where you meant?

I used the DoCmd.Maximize in the code for the form for below:

Private Sub Form_Open(Cancel As Integer)
' Minimize the database window and initialize the form.

' Move to the switchboard page that is marked as the default.
Me.Filter = "[ItemNumber] = 0 AND [Argument] = 'Default' "
Me.FilterOn = True
DoCmd.Maximize

End Sub

I don't know if there's another Sub that should have that line
added.
--
Thanks!
-Pat


:

Best place would probably be in the form's GotFocus event.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I've created a custom toolbar with 'Close' on it so that when
you
open
a
report from a switchboard, you can click on 'Close' and return
to
the
switchboard. The problem I've encountered is that the
switchboard
isn't
maximized and I can't find the proper place to include the
maximize
code
line.
 
D

Douglas J. Steele

Sorry, nothing else comes to mind.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


PB said:
When you open the first report, it is maximized. When you close out the
other
reports are not maximized (though the min/max button is active on the
report).

Clicking on the switchboard does nothing. I tried closing the report using
the File, Close on the Menu Bar and got the same results.
--
Thanks!
-Pat


Douglas J Steele said:
I assume that the report isn't maximized, which "unmaximizes" everything
else.

What happens when you click on the switchboard? It should maximize.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


PB said:
I'm sorry I wasn't clear. When I created the custom toolbar, I just
used the
'Close' button from the file category.

The custom toolbar is seen on the report. When you open the db, you go
to
the first switchboard (maximized). You select the Reports switchboard
(maximized), then select a report. When you close the report using the
'Close' on the custom toolbar it returns you to the Reports switchboard (not
maximized).

The switchboards are maximized when you exit out of a form or flip
between
switchboards, but not when you 'Close' a report.
--
Thanks!
-Pat


:

Sorry, I don't understand your comment that you "just pulled 'Close'
off the
File category on the command tab". How does that return you to the
switchboard?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


[Event Procedure] is in the On Got Focus slot.

I made a customized toolbar for the 'Close' and 'Spell Check' buttons -
just
pulled 'Close' off the File category on the command tab. Would it
make any
difference if it was a Menu Bar or Pop Up instead? Docking is
'Allow Any'.
--
Thanks!
-Pat


:

Take a look at the properties for the form and make sure that the
On Got
Focus property has [Event Procedure] as its value. (Make sure
you're
looking
at the properties of the form, and not just a control on it)

What's the actual code associated with your Close button?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Your instructions were perfect - the sub appeared just as you
said and
I
added the DoCmd.Maximize. The Switchboard still isn't maxed
when I use
the
'close' option on the toolbar, though.

Is there another command I should use instead of that one?

I really appreciate your help!
--
Thanks!
-Pat


:

When you're in the form's module in the VB Editor, select
Form in
the
left-hand combo box at the top of the module, and GotFocus in the
right-hand
combo. That should result in the following stub being created for
you:

Private Sub Form_GotFocus()

End Sub

Just put your DoCmd.Maximize in that module:

Private Sub Form_GotFocus()

DoCmd.Maximize

End Sub


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Okay, I'm lost. I know where the On Got Focus is, but I
don't know
what
event
procedure to input. Is that where you meant?

I used the DoCmd.Maximize in the code for the form for
below:

Private Sub Form_Open(Cancel As Integer)
' Minimize the database window and initialize the form.

' Move to the switchboard page that is marked as the default.
Me.Filter = "[ItemNumber] = 0 AND [Argument] =
'Default' "
Me.FilterOn = True
DoCmd.Maximize

End Sub

I don't know if there's another Sub that should have that
line
added.
--
Thanks!
-Pat


:

Best place would probably be in the form's GotFocus
event.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I've created a custom toolbar with 'Close' on it so
that when
you
open
a
report from a switchboard, you can click on 'Close' and return
to
the
switchboard. The problem I've encountered is that the
switchboard
isn't
maximized and I can't find the proper place to include
the
maximize
code
line.
 

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

Similar Threads

Switchboard 6
Switchboard in Access 2007 1
Access Switchboard error message 1
Form Event 2
Switchboard Minimized 4
Maximize form when returning 2
Switchboard Links 7
I've lost my Switchboard ! 3

Top