Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Closing in Error

Status
Not open for further replies.

bkf7911

MIS
Mar 20, 2007
83
US
I'm having an issue with a database. When i attempt to open certain queries in design view, or attempt to run certain queries, the database will close entirely, leaving no MS Access related windows open.

Why would this be occurring?
 
Have you tried compact & repair? Cold booting the PC?
If there's no love there, try creating a new database and importing all the objects from the old one. I hate when this happens...

When everything is coming your way, you're in the wrong lane.
 
Compacted/Repaired - didn't work.
Moved the DB to another PC - didn't work.
Imported all objects to another DB - didn't work.

Any idea how to fix this, and prevent in the future?
 
If the queries are very large, very complex, or operate on very large tables, this could be an issue. If there are domain aggregate functions that fail silently when the query executes, this could be the problem also. Maybe lookups or calculated fields are bombing? Have you checked the queries' tables to make sure they are still intact, and that field names have not somehow inadvertently changed?

When everything is coming your way, you're in the wrong lane.
 
bkf,
Are these Action queries or just Select queries?

If they're action, have you tried running the queries in code, for example in the debug window:
currentdb.querydefs("MyEvilUpdateQuery").execute

Or for Select queries either:
docmd.openquery("MyEvilSelectQuery")
or
Docmd.RunSql currentdb.querydefs("MyEvilSelectQuery").Sql

See if you get the same behaviour, or maybe an error message that's more informative than simply closing the mdb.
--Jim



 
It's a select query. Since i'm basically an infant when it comes to VB, modules, debug windows and such, I tried testing the VB using a command button on a form, written to reference

docmd.openquery("MyEvilSelectQuery")

It closed the database again.

I've been able to get beyond this. A second import of objects to a new DB fixed it, but i'd still like to understand the error to prevent in the future.
 
At least you have a fix. The same thing happened last week (Acc2K) to a colleague, and he ended up doing what you did to resolve. No explanation forthcoming, unfortunately.....

When everything is coming your way, you're in the wrong lane.
 
What version of Access? If it's Access 2000, then it's a result of any of many, many severe bugs in that version that were never fixed, and you'd want to upgrade.

MS had so many intensely severe bugs in that release that they essentially ran away from it screaming--refusing to even acknowledge many of them, and the only option was to upgrade.
--Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top