View Full Version : Access is saving modified forms without asking first
MSAccessRookie 05-12-2008, 08:42 AM This is about as general a question as I have had to deal with so far.
One of my users has somehow DISABLED the messages that are displayed when an access form is closed after it is modified (ie. sorting order is changed in a datasheet), and now Access saves the last changes without asking as opposed to discarding them. I am sure that there is a way to restore the settings, but I cannot seem to find it. Any Suggestions?
pbaldy 05-12-2008, 09:22 AM I believe the setting is in Tools/Options, but it's also a possibility that somewhere in the code is
DoCmd.SetWarnings False
without the corresponding
DoCmd.SetWarnings True
MSAccessRookie 05-12-2008, 12:54 PM I believe the setting is in Tools/Options, but it's also a possibility that somewhere in the code is
DoCmd.SetWarnings False
without the corresponding
DoCmd.SetWarnings True
pbaldy,
Thanks for the suggestion. I will check the SetWarnings settings, but I suspect that they are not going to be the issue, because no other user is experiencing the same symptoms. I also looked at the Tools/Options menu and found nothing that seemed to be appropriate.
Any other ideas from that you or others might have will be considered and followed up as well.
pbaldy 05-12-2008, 01:01 PM What version? Though the description doesn't match up exactly, I think the Confirm options on the Edit/Find tab control what you're describing. You'd have to look on that user's PC.
MSAccessRookie 05-12-2008, 01:09 PM Sorry,
I forgot to mention that we use MS Access 2003. I have mentioned that before in other posts, and forgot to do it this time. I will check the Edit/Find tab control settings.
MSAccessRookie 05-12-2008, 01:16 PM I have located the Edit/Find tab, and the settings are as follows:
Default Find/replace behavior = "Fast search"
Confirm record Changes = Yes
Confirm Document Deletuions = Yes
Confirm Action queries = Yes
Filter by form defaults for the database
Show list values in Local indexed fields = Yes
Show list values in Local nonindexed fields = Yes
Show list values in ODBC fields = No
Don't display lists where more than 1000 records are read
Any ideas?
pbaldy 05-12-2008, 01:27 PM Those 3 Confirm settings are the ones I was thinking about, but they're correct. Was this on the offending user's PC?
I would still double check the SetWarnings thing, as I have seen this type of behavior resulting from that. Maybe it could be in a procedure that only that user uses? Or perhaps it's happened to other users and they just aren't mentioning it?
boblarson 05-12-2008, 01:40 PM Those 3 Confirm settings are the ones I was thinking about, but they're correct. Was this on the offending user's PC?
I would still double check the SetWarnings thing, as I have seen this type of behavior resulting from that. Maybe it could be in a procedure that only that user uses? Or perhaps it's happened to other users and they just aren't mentioning it?
Or what happens frequently is that the DoCmd.SetWarnings False is being used somewhere and then an error occurs and it never gets back to the DoCmd.SetWarnings True code (worse if it is a macro).
If that code is used ANYWHERE, there should be an error handler in that same event and the first line of the error handler should be DoCmd.SetWarnings True
to reset in case it errors out before getting them reset.
MSAccessRookie 05-12-2008, 02:04 PM Those 3 Confirm settings are the ones I was thinking about, but they're correct. Was this on the offending user's PC?
I would still double check the SetWarnings thing, as I have seen this type of behavior resulting from that. Maybe it could be in a procedure that only that user uses? Or perhaps it's happened to other users and they just aren't mentioning it?
I recorded the settings that were posted, from the MS Access program settings of the user that has the problem.
I encountered some instances of the SetWarnings Command being off instead of on, and modified the macros so that they turned it back on at the point of exit. Changing the settings had no noticable effect.
boblarson,
Thanks for your help with this. I am not a Macro expert either and avoid them whenever possible, and although I think I know what you are talking about, I am not yet sure what I am going to be able to do about it. All of the items that I changed today existed as is before I ever started work on the project, and (I believe more importantly) were in use by this user before last week without any problems. The problem did not start until late last week.
boblarson 05-12-2008, 02:08 PM I recorded the settings that were posted, from the MS Access program settings of the user that has the problem.
I encountered some instances of the SetWarnings Command being off instead of on, and modified the macros so that they turned it back on at the point of exit. Changing the settings had no noticable effect.
What you can do to test to see if you can get them back is to Go to the Immediate window in the VBA editor and type:
DoCmd.SetWarnings True
and hit enter. If that was it, it will reset them.
MSAccessRookie 05-12-2008, 02:23 PM As you suggested, I opened the Immediate window in the VBA editor and typed:
DoCmd.SetWarnings True <followed by enter>
I then changed the background color (a safe item) on the user's Access Application and closed the WorkOrders form. The form closed and the changes were saved. That does not appear to have changed anything.
UPDATE:
I just tried it on other forms (when the WorkOrders form was not running) to see if anything about the WorkOrders Form that was involved, and the problem still exists. Are there any MS Access settings that the user may have modified in error?
boblarson 05-12-2008, 02:32 PM Nope, don't know of anything else that could be causing that issue, other than potentially a corrupt database file. Does this happen on any other access files?
Also, is this file on their machine or is it a shared file on the server?
MSAccessRookie 05-12-2008, 02:41 PM Nope, don't know of anything else that could be causing that issue, other than potentially a corrupt database file. Does this happen on any other access files?
Also, is this file on their machine or is it a shared file on the server?
It never occurred to me that repairing the database would have any effect. When I did that, MS Access got a Fatal Error and shut down, but when I restarted it, the control was returned to the Application, and it is asking if I want to save the changes that were made again.
I wonder what happened?
Thanks for all of the great assistance.
|
|