Access 2007
I am trying to open 3 Reports. I used this code and it works very well with two reports, but I dont't know how to do with 3 reports. Here is my code:
Private Sub PreviewReport_Click()
On Error GoTo Err_PreviewReport_Click
Dim stDocName As String
If FrameDetails.Value = 1 Then
stDocName = "ProcessedNODetails"
Else
stDocName = "ProcessedDetails"
End If
DoCmd.OpenReport stDocName, acPreview
Exit_PreviewReport_Click:
Exit Sub
Err_PreviewReport_Click:
MsgBox Err.Description
Resume Exit_PreviewReport_Click
End Sub
I am trying to open 3 Reports. I used this code and it works very well with two reports, but I dont't know how to do with 3 reports. Here is my code:
Private Sub PreviewReport_Click()
On Error GoTo Err_PreviewReport_Click
Dim stDocName As String
If FrameDetails.Value = 1 Then
stDocName = "ProcessedNODetails"
Else
stDocName = "ProcessedDetails"
End If
DoCmd.OpenReport stDocName, acPreview
Exit_PreviewReport_Click:
Exit Sub
Err_PreviewReport_Click:
MsgBox Err.Description
Resume Exit_PreviewReport_Click
End Sub