open report on top of popup form

ppoindexter

Registered User.
Local time
Today, 08:17
Joined
Dec 28, 2000
Messages
134
i am trying to make my report open up on top of the popup form that
opens it

i used some code from a previous post
as you can view below...
and i get the following error

"expected variable or procedure, not module"

i havent used modules very much
anyone know what i am doing wrong?
thanks

CODE I PLACED IN MY REPORT

Private Sub Report_Close()
'show all open forms again
SetVis True
End Sub

Private Sub Report_Open(Cancel As Integer)
'hide all open forms
SetVis False
End Sub

CODE I CREATED A MODULE WITH

Private Sub SetVis(blnVisible As Boolean)

Dim frm As Form 'object
For Each frm In Forms 'loop thru collection
'set visible property to passed argument
frm.Visible = blnVisible
Next frm 'go again
End Sub
__________________
 
Function SetVis(blnVisible As Boolean)

Dim frm As Form 'object
For Each frm In Forms 'loop thru collection
'set visible property to passed argument
frm.Visible = blnVisible
Next frm 'go again
End Function
 

Users who are viewing this thread

Back
Top Bottom