Corrupted querydef ?

R

Ray Cacciatore

I have an Access 2002 application where I have hidden querydefs named:
~sq_caaa_Graph_Sample_Code~sq_coChart

I get this when I type:
? CurrentDb.QueryDefs(0).Name
in the Immediate window while I have a code module open.

I DO have a querydef called "Graph_Sample_Code_Chart" however.

Can anyone explain this?

Thanks in advance
Ray
 
K

Klatuu

You did not say what you get.
Also, how can you be sure it is the very first querydef in the querydefs
collection?
 
G

George Nicholson

This is based on my experience, not some arcane knowledge of Access inner
workings, so someone may come along and correct me.

Is anything not working right or are you just worried because you don't know
what this "~" query is? If its just curiousity, don't worry about it.
Access often stores "hidden" queries. Example: if you type an SQL statement
into the Recordsource property of a combobox, it might create a query like
this (and possibly create it every time the combo is created on a form,
which is why saved queries are usually better performance-wise whenever
possible). Its an internal housekeeping issue, don't sweat it if everything
is working.

Also (less sure about this, based on a vague memory) "~" might designate a
temp object that goes away with compaction (and also tells Access not to
display it in the database window)

HTH,
 
R

Ray Cacciatore

Thanks George,

My application is working fine. I just happen to be working on a loop that
changes a text inside my SQL property of my querydefs. While looping, I
noticed these "~"-type queries. Someone suggested that it might be a
corrupted query that Access cannot delete for some reason...

Thanks !!
 

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