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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with code, check if any data exists 1

Status
Not open for further replies.

amcodah

Programmer
Jul 9, 2003
80
0
0
NO
I want to check if a report (sub_report) contains any data. If it doesn't it should not show. If it does it should show.
I've tried this so far, but it doesn't work. Any ideas? (The sub_report is based on a query)


Private Sub Report_Open(Cancel As Integer)
If IsNull(Me.rpt_subReport) Then
Me.Warning.Visible = False
Me.rpt_subReport.Visible = False
End If
End Sub
 
An even easier solution, will be to run the code in the sub_report. Like this. But I can't still check if Me.Name contains anything.


Private Sub Report_Open(Cancel As Integer)
If IsNull(Me.Name) Then
Me.Warning.Visible = False
End If
End Sub
[color]

If no names appear on the report, I don't want the warning (Me.Warning) to show.
 
Lookup the HasData property.

This has a sample for just what you are asking.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top