A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

queries written inside MS-Access are getting deleted



 
 
Thread Tools Display Modes
  #1  
Old December 2nd, 2009, 04:00 PM posted to microsoft.public.access.queries
harish
external usenet poster
 
Posts: 8
Default queries written inside MS-Access are getting deleted

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?

  #2  
Old December 2nd, 2009, 04:12 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default queries written inside MS-Access are getting deleted

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.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Harish" wrote:

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?

  #3  
Old December 2nd, 2009, 04:12 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default queries written inside MS-Access are getting deleted

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.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Harish" wrote:

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?

  #4  
Old December 2nd, 2009, 04:12 PM posted to microsoft.public.access.queries
Jerry Whittle
external usenet poster
 
Posts: 4,732
Default queries written inside MS-Access are getting deleted

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.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Harish" wrote:

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?

  #5  
Old December 2nd, 2009, 04:12 PM posted to microsoft.public.access.queries
Bob Barrows
external usenet poster
 
Posts: 475
Default queries written inside MS-Access are getting deleted

Harish wrote:
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.

--
HTH,
Bob Barrows


  #6  
Old December 2nd, 2009, 04:12 PM posted to microsoft.public.access.queries
Bob Barrows
external usenet poster
 
Posts: 475
Default queries written inside MS-Access are getting deleted

Harish wrote:
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.

--
HTH,
Bob Barrows


  #7  
Old December 2nd, 2009, 04:12 PM posted to microsoft.public.access.queries
Bob Barrows
external usenet poster
 
Posts: 475
Default queries written inside MS-Access are getting deleted

Harish wrote:
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.

--
HTH,
Bob Barrows


  #8  
Old December 10th, 2009, 08:43 AM posted to microsoft.public.access.queries
wangdong[_5_]
external usenet poster
 
Posts: 206
Default queries written inside MS-Access are getting deleted

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.

Wangdong


  #9  
Old December 12th, 2009, 09:21 PM posted to microsoft.public.access.queries
Tony Toews [MVP]
external usenet poster
 
Posts: 3,776
Default queries written inside MS-Access are getting deleted

wangdong wrote:

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/
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.