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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to supress the query from being visibly run?

Status
Not open for further replies.

psteja2000

Programmer
Feb 1, 2005
82
US
Hi,

I have a form on which I run a few saved queries and finally display the output in a report. My problem is, each time the report is displayed, the intermitent query results are also displayed in their own windows. How do I stop that? I am totally new to access so any kind of help is appreciated.

regards,
Teja
 
Why do you need to run the queries? If the RecordSource for your report is the query in question, the query is run automatically when the report opens.

Ken S.
 
Eupher,

I have three queries that are run before I create a new table into which I dump the final results. This table is the input for the report. But when I do .openQuery blah blah for the three queries, three windows with individual query windows open before the final report is displayed. I want to hide these query result windows.

regards,
Teja
 
Okay, now I'm having a little trouble visualising this. You are running 3 queries, the results of which end up in a table? Can you provide some more detail (SQL, code) of how you are doing this?

Ken S.
 
DoCmd.OpenQuery "qryr28-00 Create Time Commitment Base Table", acViewNormal, acEdit
DoCmd.OpenQuery "qryr28-01 Time Commitment by StaffId", acViewNormal, acEdit
DoCmd.OpenQuery "qryr28-02 Time Commitment by StaffId", acViewNormal, acEdit
DoCmd.OpenQuery "qryr28-03 Time Commitment by StaffId", acViewNormal, acEdit
DoCmd.OpenReport "Staff Time Commitment Report", acViewPreview


for 28-01 query, table created by 28-00 is the source.
for 28-02 query, 28-01 query results is the source.
for 28-03 query, 28-02 query results is the source, and this query creates a table called "Staff..." which is used by the report.

New tables are created from a query by like "select into" statement.

hope this clears. Also, this is what I noticed. 28-00,28-03 queries do not open any new windows. I am guessing that is because these two are creating a table. while the other two queries are simple select statements.

I wouldn't mind posting the queries themselves, but they are bulky.

regards,
Teja
 
And what about this ?
DoCmd.OpenQuery "qryr28-00 Create Time Commitment Base Table", acViewNormal, acEdit
DoCmd.OpenQuery "qryr28-03 Time Commitment by StaffId", acViewNormal, acEdit
DoCmd.OpenReport "Staff Time Commitment Report", acViewPreview

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
eupher,

The four queries are interdependent in the sense they have to run in the above order. because the preceding query is input for the next. So we cann't do a 28-00 and then 28-03.

One thing I noticed, any delete, make, append(update), insert queries do not show windows. Only select looks like.

I am surprised no one ever came across this type of a problem.

regards,
Teja
 
Doesn't the 28-03 automatically launch 28-02 that in turn launch 28-01 ?
Have you even tried my suggestion ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV,

I apologize. You rock. It works. I wasn't thinking your way. Thanks a lot.

regards,
Teja
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top