UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Report with empty record set    
 
   
CHKarcher
post Dec 3 2007, 02:24 PM
Post #1

UtterAccess Veteran
Posts: 450
From: Oklahoma



Know that I have done this before - in the call code for a report - If the query for the report is empty - how do I make it not display the report and give empty set msgbox

thanks
steve
Go to the top of the page
 
+
Steve Schapel
post Dec 3 2007, 02:35 PM
Post #2

UtterAccess VIP
Posts: 3,881
From: New Zealand



Steve,

You mean something like this?...

If DCount("*","MyQuery") > 0 Then
DoCmd.OpenReport "MyReport"
Else
MsgBox "No matching data"
End If
Go to the top of the page
 
+
tunkefer
post Dec 3 2007, 03:01 PM
Post #3

UtterAccess Guru
Posts: 568
From: Cleveland, OH



You can alos use the Report_NoData event of the report to cancel the opening of the report and issue your message.
Go to the top of the page
 
+
CHKarcher
post Dec 3 2007, 03:14 PM
Post #4

UtterAccess Veteran
Posts: 450
From: Oklahoma



that was it - thanks
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 24th May 2013 - 07:26 AM