Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003
    Location
    Belgium
    Posts
    42

    Question Unanswered: Check if form is open

    Hi

    Is it possible to see if a form is open through vba-code?

    Thx

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    .visible the form (or a control on the form) ...and trap errors???

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Try this:

    Public Function AuswertFormIsLoaded(F_Auswert as Form) As Boolean
    On Error GoTo AuswertFormIsLoaded_Err
    '
    ' Prüft ob das Formular 'frmName' als aktives Formular geöffnet ist.
    ' True --> Ja, False --> Nein
    '
      Dim AktFrm As Form
       AuswertFormIsLoaded = False
       Set AktFrm = Screen.ActiveForm
       If AktFrm.Name = F_Auswert Then
        AuswertFormIsLoaded = True
       End If

    AuswertFormIsLoaded_Exit:
       Exit Function

    AuswertFormIsLoaded_Err:
       AuswertFormIsLoaded = False
       Resume AuswertFormIsLoaded_Exit

    End Function

Posting Permissions

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