well, if the query isn't returning any records when you know that there are
records that meet the criteria, then there's either a problem with the query
or with the table(s). can you post the query's SQL statement?
as for the report, you can control the number of records that display in the
detail section of the report (i haven't tried this solution for
header/footer sections).
open your report in design view and add an unbound textbox control named
txtCount to the Detail section of the report.
set the control's Visible property to No, the ControlSource property to =1,
and the RunningSum property to Over All.
add the following code to the report Detail section's Format event
procedure, as
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me!txtCount > 5 Then
Me.Detail.Visible = False
End If
End Sub
you can use this solution with either a SELECT TOP query, or an ordinary
SELECT query.
hth