queries written inside MS-Access are getting deleted

H

Harish

Some of the queries I have written inside MS-Access are getting deleted
automatically. And while I run the queries through code, I get this error

'Query should have one destination field'

Explanation: I created a query in MS-access. Ran it from the code. Closed
the database. Started it again, and now for that particular query, it is
showing 'SELECT ;' only. Strange. I am in panic mode now

What can be the possible reason?
 
J

Jerry Whittle

My first thought is that the database file is corrupt. Unfortunately it's a
type of corruption that Compact and Repair probably won't fix.

Open a new database file. Import everything from the problem database into
it. If something refuses to import, it is corrupt and you will need to
rebuild it from scratch. See if that fixes the problem.

Also if you have Compact on Close enabled, disable it. I've seen it cause
similar problems.
 
B

Bob Barrows

Harish said:
Some of the queries I have written inside MS-Access are getting
deleted automatically. And while I run the queries through code, I
get this error

'Query should have one destination field'

Explanation: I created a query in MS-access. Ran it from the code.
Closed the database. Started it again, and now for that particular
query, it is showing 'SELECT ;' only. Strange. I am in panic mode now

What can be the possible reason?

Show us the code used to run it.
 
T

Tony Toews [MVP]

wangdong said:
If your mdb file is corrupt.You may try Advanced Access Repair at
http://www.datanumen.com/aar/ This tool is rather useful in salvaging
damaged Access MDB files.

1) You are an employee of such a company

2) You should be disclosing that fact more openly.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
Granite Fleet Manager http://www.granitefleet.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top