QueryDef.Count Higher than Expected

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I imported queries from an Access 97 database into a blank Access 2003
database and wanted to ensure that all the queries were imported. When I
referenced the QueryDef.Count property in each database (97 and 2003) I got a
number greater than the number of queries that I counted in the database
window. I wrote code to export the names of all the queries to a table and
some queries with names such as "~sq_rWorkOrder" were in the list and counted
in the Count property. What are these queries that effect the count property
but don't appear in the database window even if options are set to show
hidden and system objects?
 
Declan said:
I imported queries from an Access 97 database into a blank Access 2003
database and wanted to ensure that all the queries were imported. When I
referenced the QueryDef.Count property in each database (97 and 2003) I got a
number greater than the number of queries that I counted in the database
window. I wrote code to export the names of all the queries to a table and
some queries with names such as "~sq_rWorkOrder" were in the list and counted
in the Count property. What are these queries that effect the count property
but don't appear in the database window even if options are set to show
hidden and system objects?

Declan,

When you iterate through the QueryDef collection you must include
code to ignore all QueryDef objects with names beginning with "~".

As for what they are, I believe they are system-related. As for why
they don't show up when the show System objects option is selected,
I cannot tell you.


Sincerely,

Chris O.
 

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

Back
Top