Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2002
    Location
    thailand
    Posts
    1

    Unhappy Unanswered: how to detect if a form is being closed

    Hi
    I try to make form A that is open all the time in my application.Another
    form ,form B is open when user want to enter some other data. I want my form A to detect if form B is being close immediately . is there any way to do this. any help would be appreciate

  2. #2
    Join Date
    Jun 2002
    Posts
    33
    Try to verify the On Close or the On UnLoad event of the form
    PacuIonut

  3. #3
    Join Date
    Nov 2001
    Posts
    336
    Hi,

    I use function IsLoaded, posted by Dev Ashish.

    Public Function IsLoaded(ByVal strFormName As String) As boolean
    isloaded=False
    If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <> 0 Then
    If Forms(strFormName).CurrentView <> 0 Then
    fIsLoaded = True
    End If
    End If
    End Function

    Example:

    if not IsLoaded("frmB") then
    msgbox "Form frmB closed."
    endif

    HTH, Igor

Posting Permissions

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