Results 1 to 4 of 4

Thread: Is a form loaded ?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Location
    Liverpool, UK
    Posts
    64

    Question

    Whats the easiest way to check if a form is loaded or not ???


    Thanks

  2. #2
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606

    Maybe

    In your form load put a boolean variable and set it to true
    , and then do if var = true then form is loaded.

    Code:
    Dim isLoad as Boolean
    
    Private sub Form_load()
    isLoad = True
    End sub
    Try it, maybe that will make it!!!

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Location
    Liverpool, UK
    Posts
    64
    Its okay, this works...

    For i = 0 To Forms.count - 1
    If Forms(i).name = myform Then Unload myform
    Next i

  4. #4
    Guest
    Code:
    Dim bFormLoaded As Boolean
    
    Private Sub Form_Load()
    
        bFormLoaded = True
    
    End Sub
    
    Private Sub Form_Activate()
    
        If Not bFormLoaded Then Exit Sub
        
    End Sub

Posting Permissions

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



Click Here to Expand Forum to Full Width