[AccessD] Ac2013 running out of resources

Jim Dettman jimdettman at verizon.net
Fri Jun 5 09:51:06 CDT 2015


<<I saw no reason to close a QDF which was not Opened>>

 You opened it when you did the Set (it's an implicit open). The querydef
oject is an odd duck in that way and the only one where that is done within
DAO.

<< Personally I hate error handline because it doesn't show the
line of code where the failure occurs. >>

 Use MZ Tools (Freeware) to number all the code lines.  Then in your error
handler, use the undocumented vba.erl method to return the line.  I usually
use constants as well for module, procedure, and version. Here's what my
call looks like:

AppAlreadyUp_Error:
350 UnexpectedError ModuleName, RoutineName, Version, Err.Number,
Err.Description, Err.Source, VBA.Erl
360 Resume AppAlreadyUp_Exit

And here is what I get:

=============================================================
An application event was logged: 

Msgbox Title: Traffic Monitor Ver 7.44 - Unexpected error

Message: 
The application has encountered an unexpected error.
App Name: Traffic Monitor    Version: 7.44

Station Name: xxxxxx     User Name: xxxxxx

Module: frmTM     Routine: cmdShipDate_Click     Version: 2.0

Error Number: -2147217887
Description: Overflow

Source: Microsoft JET Database Engine      Line number: 130
=================================================================

   That really pin-points errors, handles them nicely, and I don't have to
handle in-line if I don't want to.

<<I do not know what you meant by my use of multistatement lines.>>

 Use of the : and two statements in a single line. i.e.

            DB.QueryDefs.Refresh: Set QDF = Nothing

<<I really, really think this has to do with outputting to PDF.>>

  Quite possibly.  At least now you know you've covered all the normal
stuff.   

 To try and test that, output in a different format and see if it still
fails.  If not, there are other ways to do PDF's.

Jim.




-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Bill Benson
Sent: Friday, June 05, 2015 10:33 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Ac2013 running out of resources

<<snip>>



More information about the AccessD mailing list