J
j0hnt52
I have a Report Contol, in a Form,with 3 possible values: Yes; No and EP
If control is set to Yes, no report will be generated, which is what I want.
Double Clicking opens ReportA if the control is set to No
I would like to have ReportB open if the control is set to EP
Currently the code is:
Private Sub Report_DblClick(Cancel As Integer)
On Error GoTo Err_Report_DblClick
Dim stDocName As String
stDocName = "ReportA"
stLinkCriteria = "[ContactID]=" & Me![ContactID]
DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
Exit_Report_DblClick:
Exit Sub
Err_Report_DblClick:
MsgBox Err.Description
Resume Exit_Report_DblClick
End Sub
I can add a line so both ReportB opens as well as ReportA, but it would be
nice to only open the specific report. Both reports need to open based on the
ContactID.
Any suggestions out there?
If control is set to Yes, no report will be generated, which is what I want.
Double Clicking opens ReportA if the control is set to No
I would like to have ReportB open if the control is set to EP
Currently the code is:
Private Sub Report_DblClick(Cancel As Integer)
On Error GoTo Err_Report_DblClick
Dim stDocName As String
stDocName = "ReportA"
stLinkCriteria = "[ContactID]=" & Me![ContactID]
DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
Exit_Report_DblClick:
Exit Sub
Err_Report_DblClick:
MsgBox Err.Description
Resume Exit_Report_DblClick
End Sub
I can add a line so both ReportB opens as well as ReportA, but it would be
nice to only open the specific report. Both reports need to open based on the
ContactID.
Any suggestions out there?