I have a report that has some code behind it. When there are no records the code throws errors. Is there a way to determine whether a report with a filtered dataset has any records in it, so I can put this block of code in an if statement?
Your code can use the [HasData] property of the report:
If Me.HasData Then
'code to run
End If
Duane
MS Access MVP
[green]Ask a great question, get a great answer.[/green]
[red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
[blue]Ask me about my grandson, get a grand answer.[/blue]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.