Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form loaded? (A2002)

    Hello All,
    Is there an easy way to tell if a form is loaded using vba?

    Thanks,
    Mark

  2. #2
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Lewes, East Sussex, Sussex, United Kingdom
    Posts
    232
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form loaded? (A2002)

    Mark

    Something like this code in a function should do it :

    intvalue = SysCmd(acSysCmdGetObjectState, acForm, strFormName)
    If intvalue = 0 Then
    FormIsOpen = False
    Else
    FormIsOpen = True
    End If

    Nick

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

    Re: Form loaded? (A2002)

    Or:

    If CurrentProject.Allforms("frmMyForm").IsLoaded Then

Posting Permissions

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