Jim Lawrence
accessd at shaw.ca
Thu May 19 00:25:09 CDT 2005
Hi Connie: In the report NoData event you have to set the integer cancel to true before the report will exit; you do not have to do anything more. See sample of subroutine below: Private Sub Report_NoData(Cancel As Integer) MsgBox "There is no matching data for this" & vbCr & _ "report. Please select another criteria", vbInformation Cancel = True End Sub HTH Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of connie.kamrowski at agric.nsw.gov.au Sent: Wednesday, May 18, 2005 7:51 PM To: accessd at databaseadvisors.com Subject: [AccessD] Exit Report on NoData Hi all, I need to put a break into a report on the Nodata event. I have included DoCmd.Close but then the subreport tries to run and calls the Original report. Can I use a command that will halt everything and return to the previous form if no data in the main form? Connie Kamrowski Analyst/Programmer Information Technology NSW Department of Primary Industries Orange Ph: 02 6391 3250 Fax:02 6391 3290 This message is intended for the addressee named and may contain confidential information. If you are not the intended recipient or received it in error, please delete the message and notify sender. Views expressed are those of the individual sender and are not necessarily the views of their organisation. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com