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

    How to tell if a form is loaded (A2003)

    Hi All,
    How can I check to see if a form is loaded using VBA? I have some code that says to switch focus to another form. However, if the user closes the form in question, an error is generated.

    Thanks,
    Mark

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

    Re: How to tell if a form is loaded (A2003)

    You can use the IsLoaded property of the AccessObject object as follows:

    If CurrentProject.AllForms("frmMyForm").IsLoaded = False Then
    ' code goes here
    ...
    End If

Posting Permissions

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