Welcome to SPN

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

Sign Up Now!

Custom Toolbar - Close Form to Maximized Switchboard

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

  1. PB

    PB
    Expand Collapse
    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.

    --
    Thanks!
    -Pat
     
  2. Loading...


  3. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

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

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no e-mails, please!)


    "PB" <PB@discussions.microsoft.com> wrote in message
    news:F108AE06-1762-458B-AF59-6B08CEFB8A01@microsoft.com...
    > 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.
    >
    > --
    > Thanks!
    > -Pat
     
  4. PB

    PB
    Expand Collapse
    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" wrote:

    > Best place would probably be in the form's GotFocus event.
    >
    > --
    > Doug Steele, Microsoft Access MVP
    > http://I.Am/DougSteele
    > (no e-mails, please!)
    >
    >
    > "PB" <PB@discussions.microsoft.com> wrote in message
    > news:F108AE06-1762-458B-AF59-6B08CEFB8A01@microsoft.com...
    > > 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.
    > >
    > > --
    > > Thanks!
    > > -Pat

    >
    >
    >
     
  5. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    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
    http://I.Am/DougSteele
    (no e-mails, please!)


    "PB" <PB@discussions.microsoft.com> wrote in message
    news:F6B5962F-399C-4B4E-8B87-1DCAD9D413F9@microsoft.com...
    > 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" wrote:
    >
    > > Best place would probably be in the form's GotFocus event.
    > >
    > > --
    > > Doug Steele, Microsoft Access MVP
    > > http://I.Am/DougSteele
    > > (no e-mails, please!)
    > >
    > >
    > > "PB" <PB@discussions.microsoft.com> wrote in message
    > > news:F108AE06-1762-458B-AF59-6B08CEFB8A01@microsoft.com...
    > > > 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.
    > > >
    > > > --
    > > > Thanks!
    > > > -Pat

    > >
    > >
    > >
     
  6. PB

    PB
    Expand Collapse
    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" wrote:

    > 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
    > http://I.Am/DougSteele
    > (no e-mails, please!)
    >
    >
    > "PB" <PB@discussions.microsoft.com> wrote in message
    > news:F6B5962F-399C-4B4E-8B87-1DCAD9D413F9@microsoft.com...
    > > 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" wrote:
    > >
    > > > Best place would probably be in the form's GotFocus event.
    > > >
    > > > --
    > > > Doug Steele, Microsoft Access MVP
    > > > http://I.Am/DougSteele
    > > > (no e-mails, please!)
    > > >
    > > >
    > > > "PB" <PB@discussions.microsoft.com> wrote in message
    > > > news:F108AE06-1762-458B-AF59-6B08CEFB8A01@microsoft.com...
    > > > > 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.
    > > > >
    > > > > --
    > > > > Thanks!
    > > > > -Pat
    > > >
    > > >
    > > >

    >
    >
    >
     
  7. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    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
    http://I.Am/DougSteele
    (no e-mails, please!)


    "PB" <PB@discussions.microsoft.com> wrote in message
    news:DDF41A19-A8DC-4B0B-9E79-C3A5A3ED4574@microsoft.com...
    > 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" wrote:
    >
    > > 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
    > > http://I.Am/DougSteele
    > > (no e-mails, please!)
    > >
    > >
    > > "PB" <PB@discussions.microsoft.com> wrote in message
    > > news:F6B5962F-399C-4B4E-8B87-1DCAD9D413F9@microsoft.com...
    > > > 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" wrote:
    > > >
    > > > > Best place would probably be in the form's GotFocus event.
    > > > >
    > > > > --
    > > > > Doug Steele, Microsoft Access MVP
    > > > > http://I.Am/DougSteele
    > > > > (no e-mails, please!)
    > > > >
    > > > >
    > > > > "PB" <PB@discussions.microsoft.com> wrote in message
    > > > > news:F108AE06-1762-458B-AF59-6B08CEFB8A01@microsoft.com...
    > > > > > 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.
    > > > > >
    > > > > > --
    > > > > > Thanks!
    > > > > > -Pat
    > > > >
    > > > >
    > > > >

    > >
    > >
    > >
     
  8. PB

    PB
    Expand Collapse
    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" wrote:

    > 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
    > http://I.Am/DougSteele
    > (no e-mails, please!)
    >
    >
    > "PB" <PB@discussions.microsoft.com> wrote in message
    > news:DDF41A19-A8DC-4B0B-9E79-C3A5A3ED4574@microsoft.com...
    > > 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" wrote:
    > >
    > > > 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
    > > > http://I.Am/DougSteele
    > > > (no e-mails, please!)
    > > >
    > > >
    > > > "PB" <PB@discussions.microsoft.com> wrote in message
    > > > news:F6B5962F-399C-4B4E-8B87-1DCAD9D413F9@microsoft.com...
    > > > > 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" wrote:
    > > > >
    > > > > > Best place would probably be in the form's GotFocus event.
    > > > > >
    > > > > > --
    > > > > > Doug Steele, Microsoft Access MVP
    > > > > > http://I.Am/DougSteele
    > > > > > (no e-mails, please!)
    > > > > >
    > > > > >
    > > > > > "PB" <PB@discussions.microsoft.com> wrote in message
    > > > > > news:F108AE06-1762-458B-AF59-6B08CEFB8A01@microsoft.com...
    > > > > > > 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.
    > > > > > >
    > > > > > > --
    > > > > > > Thanks!
    > > > > > > -Pat
    > > > > >
    > > > > >
    > > > > >
    > > >
    > > >
    > > >

    >
    >
    >
     
  9. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    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
    http://I.Am/DougSteele
    (no e-mails, please!)


    "PB" <PB@discussions.microsoft.com> wrote in message
    news:7ED52C35-A5B8-4F13-B277-61137AD18F8C@microsoft.com...
    > [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" wrote:
    >
    > > 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
    > > http://I.Am/DougSteele
    > > (no e-mails, please!)
    > >
    > >
    > > "PB" <PB@discussions.microsoft.com> wrote in message
    > > news:DDF41A19-A8DC-4B0B-9E79-C3A5A3ED4574@microsoft.com...
    > > > 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" wrote:
    > > >
    > > > > 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
    > > > > http://I.Am/DougSteele
    > > > > (no e-mails, please!)
    > > > >
    > > > >
    > > > > "PB" <PB@discussions.microsoft.com> wrote in message
    > > > > news:F6B5962F-399C-4B4E-8B87-1DCAD9D413F9@microsoft.com...
    > > > > > 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" wrote:
    > > > > >
    > > > > > > Best place would probably be in the form's GotFocus event.
    > > > > > >
    > > > > > > --
    > > > > > > Doug Steele, Microsoft Access MVP
    > > > > > > http://I.Am/DougSteele
    > > > > > > (no e-mails, please!)
    > > > > > >
    > > > > > >
    > > > > > > "PB" <PB@discussions.microsoft.com> wrote in message
    > > > > > > news:F108AE06-1762-458B-AF59-6B08CEFB8A01@microsoft.com...
    > > > > > > > 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.
    > > > > > > >
    > > > > > > > --
    > > > > > > > Thanks!
    > > > > > > > -Pat
    > > > > > >
    > > > > > >
    > > > > > >
    > > > >
    > > > >
    > > > >

    > >
    > >
    > >
     
  10. PB

    PB
    Expand Collapse
    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" wrote:

    > 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
    > http://I.Am/DougSteele
    > (no e-mails, please!)
    >
    >
    > "PB" <PB@discussions.microsoft.com> wrote in message
    > news:7ED52C35-A5B8-4F13-B277-61137AD18F8C@microsoft.com...
    > > [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" wrote:
    > >
    > > > 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
    > > > http://I.Am/DougSteele
    > > > (no e-mails, please!)
    > > >
    > > >
    > > > "PB" <PB@discussions.microsoft.com> wrote in message
    > > > news:DDF41A19-A8DC-4B0B-9E79-C3A5A3ED4574@microsoft.com...
    > > > > 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" wrote:
    > > > >
    > > > > > 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
    > > > > > http://I.Am/DougSteele
    > > > > > (no e-mails, please!)
    > > > > >
    > > > > >
    > > > > > "PB" <PB@discussions.microsoft.com> wrote in message
    > > > > > news:F6B5962F-399C-4B4E-8B87-1DCAD9D413F9@microsoft.com...
    > > > > > > 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" wrote:
    > > > > > >
    > > > > > > > Best place would probably be in the form's GotFocus event.
    > > > > > > >
    > > > > > > > --
    > > > > > > > Doug Steele, Microsoft Access MVP
    > > > > > > > http://I.Am/DougSteele
    > > > > > > > (no e-mails, please!)
    > > > > > > >
    > > > > > > >
    > > > > > > > "PB" <PB@discussions.microsoft.com> wrote in message
    > > > > > > > news:F108AE06-1762-458B-AF59-6B08CEFB8A01@microsoft.com...
    > > > > > > > > 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.
    > > > > > > > >
    > > > > > > > > --
    > > > > > > > > Thanks!
    > > > > > > > > -Pat
    > > > > > > >
    > > > > > > >
    > > > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > >
    > > >
    > > >

    >
    >
    >
     
  11. Douglas J Steele

    Douglas J Steele
    Expand Collapse
    Guest

    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
    http://I.Am/DougSteele
    (no e-mails, please!)


    "PB" <PB@discussions.microsoft.com> wrote in message
    news:9677C425-391B-45E0-B221-D034B3E8B753@microsoft.com...
    > 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" wrote:
    >
    > > 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
    > > http://I.Am/DougSteele
    > > (no e-mails, please!)
    > >
    > >
    > > "PB" <PB@discussions.microsoft.com> wrote in message
    > > news:7ED52C35-A5B8-4F13-B277-61137AD18F8C@microsoft.com...
    > > > [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" wrote:
    > > >
    > > > > 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
    > > > > http://I.Am/DougSteele
    > > > > (no e-mails, please!)
    > > > >
    > > > >
    > > > > "PB" <PB@discussions.microsoft.com> wrote in message
    > > > > news:DDF41A19-A8DC-4B0B-9E79-C3A5A3ED4574@microsoft.com...
    > > > > > 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" wrote:
    > > > > >
    > > > > > > 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
    > > > > > > http://I.Am/DougSteele
    > > > > > > (no e-mails, please!)
    > > > > > >
    > > > > > >
    > > > > > > "PB" <PB@discussions.microsoft.com> wrote in message
    > > > > > > news:F6B5962F-399C-4B4E-8B87-1DCAD9D413F9@microsoft.com...
    > > > > > > > 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" wrote:
    > > > > > > >
    > > > > > > > > Best place would probably be in the form's GotFocus event.
    > > > > > > > >
    > > > > > > > > --
    > > > > > > > > Doug Steele, Microsoft Access MVP
    > > > > > > > > http://I.Am/DougSteele
    > > > > > > > > (no e-mails, please!)
    > > > > > > > >
    > > > > > > > >
    > > > > > > > > "PB" <PB@discussions.microsoft.com> wrote in message
    > > > > > > > > news:F108AE06-1762-458B-AF59-6B08CEFB8A01@microsoft.com...
    > > > > > > > > > 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.
    > > > > > > > > >
    > > > > > > > > > --
    > > > > > > > > > Thanks!
    > > > > > > > > > -Pat
    > > > > > > > >
    > > > > > > > >
    > > > > > > > >
    > > > > > >
    > > > > > >
    > > > > > >
    > > > >
    > > > >
    > > > >

    > >
    > >
    > >
     
  12. PB

    PB
    Expand Collapse
    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" wrote:

    > 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
    > http://I.Am/DougSteele
    > (no e-mails, please!)
    >
    >
    > "PB" <PB@discussions.microsoft.com> wrote in message
    > news:9677C425-391B-45E0-B221-D034B3E8B753@microsoft.com...
    > > 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" wrote:
    > >
    > > > 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
    > > > http://I.Am/DougSteele
    > > > (no e-mails, please!)
    > > >
    > > >
    > > > "PB" <PB@discussions.microsoft.com> wrote in message
    > > > news:7ED52C35-A5B8-4F13-B277-61137AD18F8C@microsoft.com...
    > > > > [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" wrote:
    > > > >
    > > > > > 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
    > > > > > http://I.Am/DougSteele
    > > > > > (no e-mails, please!)
    > > > > >
    > > > > >
    > > > > > "PB" <PB@discussions.microsoft.com> wrote in message
    > > > > > news:DDF41A19-A8DC-4B0B-9E79-C3A5A3ED4574@microsoft.com...
    > > > > > > 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" wrote:
    > > > > > >
    > > > > > > > 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
    > > > > > > > http://I.Am/DougSteele
    > > > > > > > (no e-mails, please!)
    > > > > > > >
    > > > > > > >
    > > > > > > > "PB" <PB@discussions.microsoft.com> wrote in message
    > > > > > > > news:F6B5962F-399C-4B4E-8B87-1DCAD9D413F9@microsoft.com...
    > > > > > > > > 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" wrote:
    > > > > > > > >
    > > > > > > > > > Best place would probably be in the form's GotFocus event.
    > > > > > > > > >
    > > > > > > > > > --
    > > > > > > > > > Doug Steele, Microsoft Access MVP
    > > > > > > > > > http://I.Am/DougSteele
    > > > > > > > > > (no e-mails, please!)
    > > > > > > > > >
    > > > > > > > > >
    > > > > > > > > > "PB" <PB@discussions.microsoft.com> wrote in message
    > > > > > > > > > news:F108AE06-1762-458B-AF59-6B08CEFB8A01@microsoft.com...
    > > > > > > > > > > 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.
    > > > > > > > > > >
    > > > > > > > > > > --
    > > > > > > > > > > Thanks!
    > > > > > > > > > > -Pat
    > > > > > > > > >
    > > > > > > > > >
    > > > > > > > > >
    > > > > > > >
    > > > > > > >
    > > > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > >
    > > >
    > > >

    >
    >
    >
     
  13. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    Sorry, nothing else comes to mind.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)


    "PB" <PB@discussions.microsoft.com> wrote in message
    news:4B86FB6B-E644-4A2E-9856-2738AD46BCCF@microsoft.com...
    > 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" wrote:
    >
    >> 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
    >> http://I.Am/DougSteele
    >> (no e-mails, please!)
    >>
    >>
    >> "PB" <PB@discussions.microsoft.com> wrote in message
    >> news:9677C425-391B-45E0-B221-D034B3E8B753@microsoft.com...
    >> > 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" wrote:
    >> >
    >> > > 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
    >> > > http://I.Am/DougSteele
    >> > > (no e-mails, please!)
    >> > >
    >> > >
    >> > > "PB" <PB@discussions.microsoft.com> wrote in message
    >> > > news:7ED52C35-A5B8-4F13-B277-61137AD18F8C@microsoft.com...
    >> > > > [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" wrote:
    >> > > >
    >> > > > > 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
    >> > > > > http://I.Am/DougSteele
    >> > > > > (no e-mails, please!)
    >> > > > >
    >> > > > >
    >> > > > > "PB" <PB@discussions.microsoft.com> wrote in message
    >> > > > > news:DDF41A19-A8DC-4B0B-9E79-C3A5A3ED4574@microsoft.com...
    >> > > > > > 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" wrote:
    >> > > > > >
    >> > > > > > > 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
    >> > > > > > > http://I.Am/DougSteele
    >> > > > > > > (no e-mails, please!)
    >> > > > > > >
    >> > > > > > >
    >> > > > > > > "PB" <PB@discussions.microsoft.com> wrote in message
    >> > > > > > > news:F6B5962F-399C-4B4E-8B87-1DCAD9D413F9@microsoft.com...
    >> > > > > > > > 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" wrote:
    >> > > > > > > >
    >> > > > > > > > > Best place would probably be in the form's GotFocus
    >> > > > > > > > > event.
    >> > > > > > > > >
    >> > > > > > > > > --
    >> > > > > > > > > Doug Steele, Microsoft Access MVP
    >> > > > > > > > > http://I.Am/DougSteele
    >> > > > > > > > > (no e-mails, please!)
    >> > > > > > > > >
    >> > > > > > > > >
    >> > > > > > > > > "PB" <PB@discussions.microsoft.com> wrote in message
    >> > > > > > > > > news:F108AE06-1762-458B-AF59-6B08CEFB8A01@microsoft.com...
    >> > > > > > > > > > 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.
    >> > > > > > > > > >
    >> > > > > > > > > > --
    >> > > > > > > > > > Thanks!
    >> > > > > > > > > > -Pat
    >> > > > > > > > >
    >> > > > > > > > >
    >> > > > > > > > >
    >> > > > > > >
    >> > > > > > >
    >> > > > > > >
    >> > > > >
    >> > > > >
    >> > > > >
    >> > >
    >> > >
    >> > >

    >>
    >>
    >>
     

Share This Page