not a valid name error

V

vicki.wells

I have a query and report in Access which I've been using for years and
to which I've made no changes in months, but suddenly gives me an error
saying the query name is not valid, and I can't open either the query
or report. It was OK before, what could I check to find out what's
suddenly wrong?
 
A

Allen Browne

The symptoms suggest that the database is corrupt.

1. Make a backup copy, so that you get multiple chances at retrieving it.

2 .Uncheck the Name AutoCorrect boxes under:
Tools | Options | General

3. Compact the database:
Tools | Database Utilities | Compact

4. Close Access. Decompile the database by entering something like this at
the command prompt while Access is not running. It is all one line, and
include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

5. Compact again.

If that has not resurrected the database, get Access to rebuild the database
for you by following the steps for the first symptom in:
Recovering from Corruption
at:
http://members.iinet.net.au/~allenbrowne/ser-47.html
 
Top