Hi my report opens fine except that I can't access it without closing the form which has the following code to open the report: My question is, is there a way to open the report and maintain a focus on the report until you close it?
Private Sub CmdPreviewAllStudents_Click()
On Error GoTo Err_CmdPreviewAllStudents_Click
Dim stDocName As String
stDocName = "rptExcursionStudentRecord"
DoCmd.OpenReport stDocName, acPreview, , , acWindowNormal
Exit_CmdPreviewAllStudents_Click:
Exit Sub
Err_CmdPreviewAllStudents_Click:
MsgBox Err.Description
Resume Exit_CmdPreviewAllStudents_Click
End Sub
Kind regards
Tanya
Private Sub CmdPreviewAllStudents_Click()
On Error GoTo Err_CmdPreviewAllStudents_Click
Dim stDocName As String
stDocName = "rptExcursionStudentRecord"
DoCmd.OpenReport stDocName, acPreview, , , acWindowNormal
Exit_CmdPreviewAllStudents_Click:
Exit Sub
Err_CmdPreviewAllStudents_Click:
MsgBox Err.Description
Resume Exit_CmdPreviewAllStudents_Click
End Sub
Kind regards
Tanya