Hi All,
I have a form that I use to run roll up reports by Colleague, Team or Auditor. The team and auditor report is the same but the colleague report is different. I would like to use the same form and report button to run either report. Here is the code I am using for my report run button. I cannot seem to get the rptrollupreportsimple report to run.
If Me.SearchName.Value = "" Then
DoCmd.OpenReport "rptrollupreportsimple", acViewPreview
Else
DoCmd.OpenReport "rptrollupreportsimplecolleagueonly", acViewPreview
End If
End Sub
What I’m trying to say is that if the SearchName drop down box is Null then run the rptrollupreportsimple otherwise if the SearchName is not Null then run the rptrollupreportsimplecolleagueonly. The SearchName field is a drop down box and I think the problem is that I am not using the null value correctly.
Any suggestions?
I have a form that I use to run roll up reports by Colleague, Team or Auditor. The team and auditor report is the same but the colleague report is different. I would like to use the same form and report button to run either report. Here is the code I am using for my report run button. I cannot seem to get the rptrollupreportsimple report to run.
If Me.SearchName.Value = "" Then
DoCmd.OpenReport "rptrollupreportsimple", acViewPreview
Else
DoCmd.OpenReport "rptrollupreportsimplecolleagueonly", acViewPreview
End If
End Sub
What I’m trying to say is that if the SearchName drop down box is Null then run the rptrollupreportsimple otherwise if the SearchName is not Null then run the rptrollupreportsimplecolleagueonly. The SearchName field is a drop down box and I think the problem is that I am not using the null value correctly.
Any suggestions?