Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Report Count

Status
Not open for further replies.

schwarem

Programmer
Apr 18, 2002
159
US
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]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top