I have a popup form that lists all my reports. Each report has 2 command buttons 1 to preview and 1 to direct print the report. When I launch the report the Main form minimizes so I can see the report viewer. Closing the report maximizes the Main form again. Everything works fine the first time I preview. After closing the report and clicking preview again, Access minimizes going to the task bar?
Preview Button Code
Private Sub Command24_Click()
On Error GoTo Err_Command24_Click
Dim stDocName As String
stDocName = "rptCageInv"
DoCmd.Maximize
DoCmd.OpenReport stDocName, acPreview
DoCmd.close acForm, "REPORTCENTRAL"
DoCmd.close acForm, "STRAIGHTEDGE HOME"
DoCmd.Maximize
Exit_Command24_Click:
Exit Sub
Err_Command24_Click:
MsgBox "Please Re-Enter Your Dates", vbOKOnly
Resume Exit_Command24_Click
End Sub
Any idea's???
Cheers,
Preview Button Code
Private Sub Command24_Click()
On Error GoTo Err_Command24_Click
Dim stDocName As String
stDocName = "rptCageInv"
DoCmd.Maximize
DoCmd.OpenReport stDocName, acPreview
DoCmd.close acForm, "REPORTCENTRAL"
DoCmd.close acForm, "STRAIGHTEDGE HOME"
DoCmd.Maximize
Exit_Command24_Click:
Exit Sub
Err_Command24_Click:
MsgBox "Please Re-Enter Your Dates", vbOKOnly
Resume Exit_Command24_Click
End Sub
Any idea's???
Cheers,