Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2002
    Location
    San Antonio, TX
    Posts
    69

    Unanswered: A97: Report Question

    Is there a way to tell if a report is already open?
    "Doing stuff is overrated. Take Hitler for example. He did lots but don't we all wish he'd have just stayed home and gotten stoned?"

  2. #2
    Join Date
    Nov 2002
    Location
    San Francisco
    Posts
    251
    opened reports and forms are in collection FORMS and REPORTS, so you can go through it and find your report or form... or you can use this Microsoft Sub....

    jiri


    for form....

    Function IsFormLoaded(ByVal strFormName As String) As Boolean
    ' Returns True if the specified form is open in Form view or Datasheet view.

    Const conObjStateClosed = 0
    Const conDesignView = 0

    If SysCmd(acSysCmdGetObjectState, acForm, strFormName) <> conObjStateClosed Then
    If Forms(strFormName).CurrentView <> conDesignView Then
    IsformLoaded = True
    End If
    End If

    End Function




    and for report (simple change)...


    Function IsReportLoaded(ByVal strFormName As String) As Boolean

    Const conObjStateClosed = 0

    If SysCmd(acSysCmdGetObjectState, acReport, strFormName) <> conObjStateClosed Then
    IsReportLoaded = True
    End If

    End Function

  3. #3
    Join Date
    Feb 2002
    Location
    San Antonio, TX
    Posts
    69
    Thanks for the quick response.
    "Doing stuff is overrated. Take Hitler for example. He did lots but don't we all wish he'd have just stayed home and gotten stoned?"

Posting Permissions

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