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

Hide records with null values in report

Status
Not open for further replies.

wvandenberg

Technical User
Oct 24, 2002
125
0
0
CA
I have a report that displays the top two winners in each category that looks like this:

Votes Car Name
1939 & Under Antique
301 25 Bob Jones
285 36 Janice Brown
40's Modified
null 200 Jane Doe
null 88 Grampa Fred
40's Stock
54 67 Greg Note
null 54 Don Vern

Sometimes one or both of the "top 2 winners" will not have any votes and the votes field will be Null for that particular record. How would I design the report so that the category/group (ie. 1939 & Under Antique, 40's Modified, 40's Stock etc.) will still show up but the Null records won't. I would like the above example to look like this:

Votes Car Name
1939 & Under Antique
301 25 Bob Jones
285 36 Janice Brown
40's Modified
40's Stock
54 67 Greg Note

I've tried the following in the Detail_Print event:
If IsNull(Me.Votes) Then Me.Detail.Visible = False
but it only works when both votes are null.

I also tried Me.Filter = Not IsNull(Votes) but then the category headings with two null votes don't show.

If anyone has some other suggestions, I would greatly appreciate hearing them.

Thanks,
Wendy
 
Try this code in your report

If me.Votes = 0 then
cancel = true
End If


hope it works for you
mk
 
Thanks mk. I just changed the = 0 to = Null and it works.

Wendy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top