Solved

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

Posted on 2012-03-15
4
454 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

762 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