I used data environment to produce report. Pass SQL statement as command object. But there is no record of the criteria set in the SQL statment and still the report display with blank page.
WHat I want is that if record does not match then the report should not appear on the screen.
mfi
Please don't hijack someone else's thread! Read faq222-2244 to see why you should start a new problem in a new thread.
To solve your current problem, check your recordset for EOF before showing the report:
If Not myRST.EOF then
DataReport.Show
Else
Msgbox "No records"
End If
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'People who live in windowed environments shouldn't cast pointers.'
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.