• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 468
  • Last Modified:

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

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
goldylamont
Asked:
goldylamont
  • 2
3 Solutions
 
CodeCruiserCommented:
Do you remember the changes you made recently? Do you have an old backup version to compare with?
0
 
Bill RossCommented:
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
 
goldylamontAuthor Commented:
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
 
goldylamontAuthor Commented:
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now