Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

14. Sonstige Optimierungen > 14.4 Formularstatus ermitteln

14.4 Formularstatus ermitteln

Die SysCmd()-Funktion beherrscht so viele unterschiedliche Fähigkeiten, dass ein wenig der Verdacht aufkommt, dort hätten die Access-Entwickler ganz zum Schluss alles hineingepackt, was noch übrig war. Sie ist nämlich auch geeignet, um herauszufinden, ob ein Formular (oder Bericht) schon geöffnet ist.

  1. Normalerweise würden Sie wohl eine Schleife wie die folgende programmieren. Die Funktion IstFormularOffen() erhält als Argument den Namen des Formulars und gibt einen Boolean-Wert zurück:

    Function IstFormularOffen(strFormularname As String) As Boolean
    
       Dim intAnzahl As Integer
    
       For intAnzahl = 0 To Forms.Count - 1
          If LCase(strFormularname) = LCase(Forms(intAnzahl).Name) Then
             IstFormularOffen = True
             Exit For
          End If
       Next
    
    End Function

  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial