Keeping queries hidden

J

Jessica

Greetings!

I want to hide many of my queries from view, so I set the
Attributes to Hide, under their properties. They remain
hidden until they are run and then they are visible
again. I want them to remain hidden even after being
run.
I think the problem comes from the fact that I am creating
these queries 'on the fly' through forms that supply the
information needed to build the SQL string for the query
in a module. The sql string is then set to the query
using:

CurrentDb.QueryDefs("Query_Name").SQL = strSQL

And I open the query with:
DoCmd.OpenQuery "D_CPUE_1"

Once the query is opened in this method it has reset its
Attributes to the default where it is visible again. Is
there any code out there to set the query to always be
hidden and not visible?

thanks!

Jessica
 

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