J
Jim Franklin
Hi,
I have an Acc2010 app where I open a report in Preview mode from a modal,
popup form. I don't want the form to be closed, but want it hidden while the
report is open.
At the moment I set the form Visible property to False in the command button
code which opens the report. This works fine. But when I set the
form.Visible property back to true in the report Close event, nothing
happens. No error, but the form doesn't reappear either.
Code is as follows. This works fine in Acc2003, so anyone know what I am
doing wrong?
Many thanks, as always,
Jim
Private Sub cmdTurnover_Click()
On Error GoTo Err_cmdTurnover_Click
Me.Visible = False
DoCmd.OpenReport "rpt_Turnover", acViewPreview
DoCmd.Maximize
Exit_cmdTurnover_Click:
Exit Sub
Err_cmdTurnover_Click:
MsgBox Err.Description
Resume Exit_cmdTurnover_Click
End Sub
Private Sub Report_Close()
On Error GoTo MyErr
Forms!frm_Menu_Reports.Visible = True
MyExit:
Exit Sub
MyErr:
MsgBox Err.Description
Resume MyExit
End Sub
I have an Acc2010 app where I open a report in Preview mode from a modal,
popup form. I don't want the form to be closed, but want it hidden while the
report is open.
At the moment I set the form Visible property to False in the command button
code which opens the report. This works fine. But when I set the
form.Visible property back to true in the report Close event, nothing
happens. No error, but the form doesn't reappear either.
Code is as follows. This works fine in Acc2003, so anyone know what I am
doing wrong?
Many thanks, as always,
Jim
Private Sub cmdTurnover_Click()
On Error GoTo Err_cmdTurnover_Click
Me.Visible = False
DoCmd.OpenReport "rpt_Turnover", acViewPreview
DoCmd.Maximize
Exit_cmdTurnover_Click:
Exit Sub
Err_cmdTurnover_Click:
MsgBox Err.Description
Resume Exit_cmdTurnover_Click
End Sub
Private Sub Report_Close()
On Error GoTo MyErr
Forms!frm_Menu_Reports.Visible = True
MyExit:
Exit Sub
MyErr:
MsgBox Err.Description
Resume MyExit
End Sub