K
Kirk P.
I've got a multi-select list box that allows me to preview selected reports.
Works fine, except certain reports (index # 3 and 4) require criteria from
frmTranDate in order to run. Is there a way to modify this code so when
index number's 3 or 4 are selected, the Tran Date form pops up?
Private Sub cmdOK_Click()
On Error GoTo Err_cmdOK_Click
Dim varPosition
For Each varPosition In Me![lstReports].ItemsSelected
DoCmd.OpenReport Me.lstReports.ItemData(varPosition), acViewPreview
Next
Exit_cmdOK_Click:
Exit Sub
Err_cmdOK_Click:
If Err.Number = 2501 Then
'Ignore the error
Resume Exit_cmdOK_Click
Else
MsgBox "Error: " & Err.Number & " " & Err.Description, 16, "Report
Print"
Resume Exit_cmdOK_Click
End If
End Sub
Works fine, except certain reports (index # 3 and 4) require criteria from
frmTranDate in order to run. Is there a way to modify this code so when
index number's 3 or 4 are selected, the Tran Date form pops up?
Private Sub cmdOK_Click()
On Error GoTo Err_cmdOK_Click
Dim varPosition
For Each varPosition In Me![lstReports].ItemsSelected
DoCmd.OpenReport Me.lstReports.ItemData(varPosition), acViewPreview
Next
Exit_cmdOK_Click:
Exit Sub
Err_cmdOK_Click:
If Err.Number = 2501 Then
'Ignore the error
Resume Exit_cmdOK_Click
Else
MsgBox "Error: " & Err.Number & " " & Err.Description, 16, "Report
Print"
Resume Exit_cmdOK_Click
End If
End Sub