Solved

Access Error: This action will reset your code...

Posted on 2012-03-15
4
456 Views
Last Modified: 2012-04-04
Hello, I am at a total loss. I have been updating queries, etc in an Access database (I use version 2007 to work but the actual file is v2003/.mdb). Somehow now, seemingly randomly, when I open some reports and they are churning through data I get the dreaded error message "This action will reset your project..." with the click Yes/No dialogue. If I click No the report opens fine.

After this error occurs I can't Compact and Repair the database as I get an error saying that I can't compact/repair using VB code and that I should use the Start Menu instead (but I already am using the start menu to compact/repair). Also, there is no way to close the database at this point without MSACCESS.EXE then being pegged at 100% and having to force close.

It's weird because I can still use the database even after these errors (by clicking "No") but I can't close it.

I'm thinking this has to do with some recent code in modules that I may have added recently--problem is I don't know how/where to find this.

PLEASE READ: Below are steps I have ALREADY TRIED and this does not fix the problem:
1) Compact/Repair Database
2) open file using the /decompile switch
3) Removed all References in VB, quitting and then adding these References back

None of the above works, issue persists. Thanks!
0
Comment
Question by:goldylamont
  • 2
4 Comments
 
LVL 83

Assisted Solution

by:CodeCruiser
CodeCruiser earned 250 total points
ID: 37726711
Do you remember the changes you made recently? Do you have an old backup version to compare with?
0
 
LVL 14

Assisted Solution

by:Bill Ross
Bill Ross earned 250 total points
ID: 37729424
Hi,

As a first step I would create a new blank 2003 version MDB and import all objects from the existing mdb.  If one of the objects fails to import then that will lead you to the issue.  If nothing fails then that may correct the problem.

Regards,

Bill
0
 

Accepted Solution

by:
goldylamont earned 0 total points
ID: 37788922
Access is stupid. The problem occurred because for certain reports I would ask the user to enter start and ending dates to filter the report data by. So when the report would open (in it's OnOpen() func) I would use DoCmd.OpenForm to open a popup form which would ask for start/end dates. Then this form would save these dates to global vars which the report would use to filter by.

Well, turns out this works perfectly except I believe in situations where Access has to "work hard" to run a certain query. The underlying queries for all my reports needed updating after doing some normalizing on the database and some of them took a little longer to run. Somehow, opening this form and then running the report caused this silly error.

I fixed it by doing this--I still open the form on report's OnOpen() function. But after the date form closes I also open up a Message Box that just says "Please click OK to run the report"--for some reason giving Access this short pause resolves the error I was having.

This was super frustrating and hard to track down. I don't feel my code is bad at all...in any case glad to have this behind me. Hope this helps if other users encounter this situation.
0
 

Author Closing Comment

by:goldylamont
ID: 37805192
guys neither of your suggestions actually fixed my issue, but they are good steps to take (I did do what you recommended) to try and resolve the issue. so i split points evenly. thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now