Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Posts
    64

    Unanswered: Minimize Form1 - Open Form2

    How can I minimize one form as it open another form?
    I created a command button in "Contacts" form that opens "Calls" form. When I open the "Calls" form I want "Contacts" form to minimize (not close).

    Private Sub Command111_Click()
    On Error GoTo Err_Calls_Click
    If IsNull(Me![ContactID]) Then
    MsgBox "Enter contact information before making a call."
    Else
    DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
    DoCmd.OpenForm "Calls"
    End If

    Exit_Calls_Click:
    Exit Sub

    Err_Calls_Click:
    MsgBox Err.Description
    End Sub

    Thanks.

  2. #2
    Join Date
    Nov 2003
    Location
    New Zealand
    Posts
    47

    Re: Minimize Form1 - Open Form2

    I'm not sure if this is what your looking for, but have you tried

    DoCmd.Minimize

    It will minimise the form when you click the cmd button


    Private Sub Command111_Click()
    On Error GoTo Err_Calls_Click
    If IsNull(Me![ContactID]) Then
    MsgBox "Enter contact information before making a call."
    Else
    DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

    "I would try it here"
    DoCmd.Minimize
    DoCmd.OpenForm "Calls"
    End If

    Exit_Calls_Click:
    Exit Sub

    Err_Calls_Click:
    MsgBox Err.Description
    End Sub

    good luck
    Nerdy Girl

  3. #3
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Making it invisible

    Alternatively, you could hide form 1 by making it invisible.

    (This still enables you to refer to controls on form 1 from form 2)

    Private Sub Command111_Click()
    On Error GoTo Err_Calls_Click
    If IsNull(Me![ContactID]) Then
    MsgBox "Enter contact information before making a call."
    Else
    DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

    forms!NAMEOFFORM1.visible = false
    DoCmd.OpenForm "Calls"
    End If

    Exit_Calls_Click:
    Exit Sub

    Err_Calls_Click:
    MsgBox Err.Description
    End Sub

    Also in the on-close event of form 2

    forms!NAMEOFFORM1.visible = true
    Windows Server 2003-8 / Terminal Services / SQL 2000 / Access 2003 / Office 2003-7 / Exchange 2003-7 / Blackberry Enterprise Server / AutoCAD / Lambert And Butler / Red Bull

  4. #4
    Join Date
    Jan 2004
    Posts
    64
    Thanks for the help. I went ahead with the hiding option and it worked just fine.

    Thanks for sharing the knowledge.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •