Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Close forms (A2k)

    I know there's a routine to close all forms other than the form which is currently active.

    I have an option in my db to restart.
    The database doesn't really re-start but the user thinks so, it just refreshes.

    Dim frm As Form
    Set frm=Me

    If other forms are <> frm, close them all ???

    Can some-one help here

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Close forms (A2k)

    Sub CloseAllOtherForms()
    Dim frm As Form
    For Each frm In Forms
    If Not (frm Is Screen.ActiveForm) Then
    DoCmd.Close acForm, frm.Name, acSaveNo
    End If
    Next frm
    Set frm = Nothing
    End Sub

  3. #3
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Close forms (A2k)

    Thanks Hans
    Nice to see your participation on a Saturday !! <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

Posting Permissions

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