I have serveral reports that will open when a macro is run. The Macro hangs when comes to a report that contains no data and produces the following error: "You entered an expression that has no value".
In the detail section of each report I have the following code in the On Format event. I need someway or another, maybe in the macro or the report to skip the report if there is no data so the macro can continue on to the next report.
[Blue] Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim ctl As Control
Set ctl = Me!SalesRevenue
If Status = "Lost" Then
ctl.FontBold = True
ctl.ForeColor = vbRed
Else
ctl.FontBold = False
ctl.ForeColor = vbBlack
End If
End Sub[/blue]
Thank You for your assistance
In the detail section of each report I have the following code in the On Format event. I need someway or another, maybe in the macro or the report to skip the report if there is no data so the macro can continue on to the next report.
[Blue] Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim ctl As Control
Set ctl = Me!SalesRevenue
If Status = "Lost" Then
ctl.FontBold = True
ctl.ForeColor = vbRed
Else
ctl.FontBold = False
ctl.ForeColor = vbBlack
End If
End Sub[/blue]
Thank You for your assistance