[AccessD] On-site emergency! A2K: Error when clicking cance l in report dialog

Drew Wutka DWUTKA at marlow.com
Fri Aug 15 17:00:50 CDT 2003


Didn't test it myself.  Let me know if it works or not!

Drew

-----Original Message-----
From: Christopher Hawkins [mailto:clh at christopherhawkins.com]
Sent: Friday, August 15, 2003 2:18 PM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] On-site emergency! A2K: Error when clicking
cancel in report dialog


*blink*  *blink*

That's brilliant.  Let me give it a try...

-C-

---- Original Message ----
From: DWUTKA at marlow.com
To: accessd at databaseadvisors.com, 
Subject: RE: [AccessD]  On-site emergency!  A2K: Error when clicking
cancel in report dialog
Date: Fri, 15 Aug 2003 14:08:43 -0500

>How about setting opposite dates when they click cancel (ie, the 
>first date
>being tomorrow, and the last date being today....thus, no data), 
>then set
>Cancel=True in the NoData event of the report.
>
>Drew
>
>-----Original Message-----
>From: Christopher Hawkins [mailto:clh at christopherhawkins.com]
>Sent: Friday, August 15, 2003 1:51 PM
>To: accessd at databaseadvisors.com
>Subject: [AccessD] On-site emergency! A2K: Error when clicking 
>cancel in
>report dialog
>
>
>I'm on-site with one of my few remaining clients right now.  I can't
>afford to foul this up.
>
>I have a form (frmReport) that presents a list of reports to the 
>user.
>
>Some reports require date ranges, so in the Open event of the report,
>I have code (stolen straight) from Northwind that will open the date
>range dialog (frmDateRange) modally.  Ordinarily, the user would
>enter a date range and click OK, rendering frmDateRange invisible and
>allowing the rest of the Report_Open code to fire.
>
>But if the user clicks Cancel in frmDateRange, the code in
>Report_Open is supposed to see that frmDateRange is no longer loaded,
>set Cancel = True, and close.  And it does - but Access also throws a
>2501 error that breaks on the DoCmd.Open Report line from frmReport!
>
>I've tried trapping for error 2501 in frmReport - the procedure
>doesn't even make it to the error handling section of the sub; it
>just sits there on the DoCmd.OpenReport line.  I don't know what to
>do to either avoid throwing thid error (preferable), or managing what
>happens after the error is thrown.
>
>And before you ask, I cannot paste code because my client won't let
>me.
>
>Heeeeeeeelp...
>
>-Christopher-
>
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com
>
>

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list