Programmatically Doing "Save As Query"

B

BillG

I am using "Filter By Form" to filter my data. I am programmatically doing
the equivalent of selecting "Save As Query" on the shortcut menu, by using
the following:

DoCmd.RunCommand acCmdSaveAsQuery

However, when I do this, the user must always enter a name for the query.
Does anyone know of a way to specify the filename programmatically, so the
user doesn't have to enter it? I would also like to avoid getting the
warning dialog that says the query already exists.

Also, once I'm in "Filter By Form" mode, is there a programmatic way to
cancel out of it?

Any help will be appreciated.
 

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