Can't get reports 'Visible'

Carl_R

Registered User.
Local time
Today, 08:22
Joined
Aug 16, 2002
Messages
82
Am I thick and if so, do I need to be publicly flogged?

I have some code which completely hides the Access window. All the user sees is the main form. I understand that because this form is popup, I will have to toggle the visible property of the form and report. This is where I am stuck.

My code to toggle is as follows and is on the On Close and On Open property of the report.

On Close:
Private Sub Report_Close()
[Forms]![frmChanges].Visible = True
End Sub

On Open:
Private Sub Report_Open(Cancel As Integer)
[Forms]![frmChanges].Visible = False
Me.Visible = True 'this is the report
DoCmd.Maximize
End Sub

When I try and open the report from the form, the form disappears (great!) but the report is not displayed (not so great!) :(
 
change this line: Me.Visible = True for Reports(ReportName).Visible = True


You can also change this line: [Forms]![frmChanges].Visible = False for Me.Visible = False, it will fasten up your code (but you probably won't see the difference)
 
Mario said:
change this line: Me.Visible = True for Reports(ReportName).Visible = True


You can also change this line: [Forms]![frmChanges].Visible = False for Me.Visible = False, it will fasten up your code (but you probably won't see the difference)

Same result. Everything still disappears.
 
Is your report opened?

docmd.OpenReport ReportName
 

Users who are viewing this thread

Back
Top Bottom