Query clears itself in Access 2000

  • Thread starter Thread starter David Gartrell
  • Start date Start date
D

David Gartrell

I don't know if anyone can help me with this or not but for no obvious
reason a query will sometimes totally clear itself and will either have to
be re-written or restored from a backed-up version. When I say 'cleared'
what I mean is that the query still appears on the query list but in SQL
view, the code has completely vanished! Everything also disappears from
design view too.

Anyway it's really odd and i'm baffled as to why its doing it. If anyone
knows why it may be doing it and especially what the solution is to stop it
then i'd be really grateful.

Many thanks

David.
 
David, this could be several things.

The first thing would be to check that you have the latest service packs
installed, both for Office 2000 and also for JET 4. You can get both updates
from here:
http://support.microsoft.com/sp

After that, Name AutoCorrect would be the number one suspect.
Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Then compact the database:
Tools | Database Utilities | Compact/Repair
Explanation of why:
http://allenbrowne.com/bug-03.html

This should prevent the problem, unless you have something else weird going
on, such as multiple users in an unsplit database at once, or bae drivers
connecting to 3rd party tables.

It might be informative to test whether the SQL statement really has gone.
Open the Immediate Window (Ctrl+G), and enter:
? currentdb.QueryDefs("Query1").SQL
substituting the name of a damaged query for Query1.
 
Back
Top