[AccessD] Close object without saving

Heenan, Lambert Lambert.Heenan at AIG.com
Thu Jun 9 12:55:16 CDT 2005


Like I said, I strongly suspect that at one time or another you got a
runtime error in one of your of the routines that turns the warnings off,
and that's what the corresponding line to turn them back on never executed.
That's what I meant by ensuring that your routines have error handlers, so
that the error handler will turn the warning back on regardless of what
error happened.

Lambert

-----Original Message-----
From: Jim Hewson [mailto:JHewson at karta.com] 
Sent: Thursday, June 09, 2005 12:15 PM
To: Heenan, Lambert
Subject: RE: [AccessD] Close object without saving


Thanks.
I reviewed the code and each time SetWarnings was set to false, I have
another line that turns them back on.

I'm not sure what I did, but it's working correctly now....

Thanks,
Jim 

-----Original Message-----
From: Heenan, Lambert [mailto:Lambert.Heenan at AIG.com] 
Sent: Thursday, June 09, 2005 10:54 AM
To: 'Access Developers discussion and problem solving'
Cc: Jim Hewson
Subject: RE: [AccessD] Close object without saving

What you need is 

Docmd.SetWarnings True

Which you can type in the immediate window and hit enter.

This setting is specific to each database, and it defaults to True (On).

Normally this code is used, for example, just before running an update
query, and then the warnings are turned back on with Docmd.SetWarnings True.


I suspect that you have turned warnings off at some point in your code and
then did not turn them back on. This setting persists with the database even
when it is closed and started up again.

A common cause of the problem is where warnings are turned off in code, but
then a runtime error happened and they were never turned back on. That is
why I always ensure that routines that turn off the warnings have an error
handler that turns them back on.

Lambert

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Jim Hewson
Sent: Thursday, June 09, 2005 11:27 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Close object without saving


No, I found that.
What I'm looking for is the dialog box and asks if I want to save the query,
form, etc. Instead it automatically saves. Thanks Jim


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Randall R Anthony
Sent: Thursday, June 09, 2005 10:16 AM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Close object without saving

Is this what you're looking for?  Added to the end of the DoCmd. statement.

, acSaveNo
--
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