M
Micki
I have a form (frmJobs) with a field called ClientName. If ClientName is
similar to certain criteria, I need one report to display. If ClientName is
not similar to the criteria, a different report should display. This is the
code I currently have:
Private Sub PrelimRpt_Click()
If Me.ClientName = "Apache*" Then
DoCmd.OpenReport "DISAJobReport ", acViewPreview
If Me.ClientName = "El Paso*" Then
DoCmd.OpenReport "DISAJobReport", acViewPreview
End If
Else: DoCmd.OpenReport "JobReport", acViewPreview
End If
End Sub
Unfortuately, the Else option (JobReport) displays regardless of the field
contents. Can anyone help?
similar to certain criteria, I need one report to display. If ClientName is
not similar to the criteria, a different report should display. This is the
code I currently have:
Private Sub PrelimRpt_Click()
If Me.ClientName = "Apache*" Then
DoCmd.OpenReport "DISAJobReport ", acViewPreview
If Me.ClientName = "El Paso*" Then
DoCmd.OpenReport "DISAJobReport", acViewPreview
End If
Else: DoCmd.OpenReport "JobReport", acViewPreview
End If
End Sub
Unfortuately, the Else option (JobReport) displays regardless of the field
contents. Can anyone help?