Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide Query on Run command

Status
Not open for further replies.

BillMc

Programmer
Dec 8, 2000
45
0
0
US
My application uses many action queries that run as an Event Procedure. Following is one example:

DoCmd.OpenQuery "AutoQDate", acViewDesign, acEdit
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdRun
DoCmd.Close acQuery, "AutoQDate"

Although I have reduced the size of the query window, it still is visible and flashes while running.

Is there a way to hide it and still have it open in design view? Is there a hide command? My queries are very large and it would be an enormous task to convert these queries to VB code. Thanks, Bill
 
Bill,

Have you checked the results of
Code:
   DoCmd.OpenQuery "AutoQDate"

With action queries, opening them in acViewNormal (the default) will actually just run the query without having to open it.

I tried this with a Data definition query that added a column to a table and an update query. Neither one of them had to open to run.



HTH
John

Use what you have,
Learn what you can,
Create what you need.
 
Hi John, Thanks for the response. I will give this a try later today. Bill
 
John, I tried removing the AcViewdesign.. and ran the query. It ran and ran. It just did not stop. According to microsoft Access help, an action query needs to be in design view to run. Bill
 
Bill,

Did you run the query or open the query?

Help also says that if you open an action query that returns no records, it will actually just run in the background.


Getting closer?
John

Use what you have,
Learn what you can,
Create what you need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top