[AccessD] Reports On top

Joseph O'Connell joconnell at indy.rr.com
Tue Jun 8 14:21:33 CDT 2004


Mike,

Here is a subroutine that I use to open reports.  If the report is opened in
preview mode, then all popup forms hidden.  Once the report is closed, the
popup forms are restored.

Joe O'Connell

'---------------------------------------------------------------------------
----------
'   Open a report
'   If the report is opened in preview mode, hide all popup forms until the
report is closed
'---------------------------------------------------------------------------
----------
Public Sub OpenReport(ByVal strReportName As String, _
                      ByVal intMode As Integer, _
                      ByVal strReportWhere As String)
    Dim i As Integer, intNum As Integer
    Dim strPopupForm() As String
    Const conObjStateClosed = 0

    DoCmd.OpenReport strReportName, intMode, , strReportWhere
    If intMode = acViewPreview Then
        intNum = 0
        For i = 0 To Forms.Count - 1
            If Forms(i).PopUp = True And Forms(i).Visible = True Then
                Forms(i).Visible = False
                intNum = intNum + 1
                ReDim Preserve strPopupForm(intNum)
                strPopupForm(intNum) = Forms(i).Name
            End If
        Next i
        While SysCmd(acSysCmdGetObjectState, acReport, strReportName) <>
conObjStateClosed
            DoEvents
        Wend
        For i = 1 To intNum
            Forms(strPopupForm(i)).Visible = True
        Next i
    End If
    ReDim strPopupForm(0)
End Sub




-----Original Message-----
From: Rocky Smolin - Beach Access Software <bchacc at san.rr.com>
To: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>
Date: Monday, June 07, 2004 11:08 PM
Subject: Re: [AccessD] Reports On top


|Hey Mike:
|
|I just dodged that bullet on a pop up called from a pop up that wouldn't
pop
|up in front.  So in the open event of the second pop up I made the first
one
|invisible, then in the close event of the second popup I made the first pop
|up visible again.  I'll bet you could do that to your pop up in the open
and
|close events of the report.  Maybe.
|
|Rocky
|
|----- Original Message -----
|From: "Gowey Mike W" <Mike.W.Gowey at doc.state.or.us>
|To: "Access Developers discussion and problem solving"
|<accessd at databaseadvisors.com>
|Sent: Monday, June 07, 2004 9:51 AM
|Subject: [AccessD] Reports On top
|
|
|>
|> Hi everyone,
|>
|> I currently am working on a database in which I have the input form come
|> up as a popup for that it displays on the entire screen.  Now I need to
|> know if there is a way for me to view a report by pressing a button on
|> the form.  Currently it will not show the report because the input form
|> is on top.  Can I make the report open up in a popup type of way so that
|> the report is on top and viewable until closed.
|>
|> I hope that makes sense.  Any help would be greatly appreciated.
|>
|>
|> Mike Gowey  MCSA, A+, LME
|> Team Leader - SRCI
|> Information Systems & Services Division
|> Technical Support Analyst
|>
|>
|> --
|> _______________________________________________
|> AccessD mailing list
|> AccessD at databaseadvisors.com
|> http://databaseadvisors.com/mailman/listinfo/accessd
|> Website: http://www.databaseadvisors.com
|
|--
|_______________________________________________
|AccessD mailing list
|AccessD at databaseadvisors.com
|http://databaseadvisors.com/mailman/listinfo/accessd
|Website: http://www.databaseadvisors.com





More information about the AccessD mailing list