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!

DONT PRINT BLANK REPORT

Status
Not open for further replies.

DIRENE

Technical User
Jan 19, 2004
51
0
0
US
Ok I have a letter builded in a report that pull some info from a query. But if the query is null. The report with still print the letter.

The question is how do I get the report not to print if the infor in the query is null.

Thank you for any help!!!!!

irene
 
One thing I've done in the past is in the On Load event of your report, have it check if any records have been returned, and if not, close the report before it can fully open. Here's code I've used. I think this was for a form, but I'm sure the same applies to reports.

Code:
If Me.CurrentRecord = 0 Then
    MsgBox ("No items found matching the search criteria"), vbExclamation
    DoCmd.Close
End If
 
DIRENE,

Check out this FAQ by Garridon: FAQ703-1594

Hoc nomen meum verum non est.
 
Thank you both for the help. The one that worked for me was the FAQ703-1594. Thanks again Irene
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top