Close again

R

rob p

This is a reposting - I needed to press a command button and run 4 querys
(in the background if possible). Suggested code - execute method - gave me
this message:

"Cannot execute a select query" on the first statement.

It is a passthru query getting data from Mas90 ODBC and also two maketable
querys

Any suggestions? I can us DoCmd but have to close each window of each query.
Thanks much.
 
J

John Vinson

This is a reposting - I needed to press a command button and run 4 querys
(in the background if possible). Suggested code - execute method - gave me
this message:

"Cannot execute a select query" on the first statement.

It is a passthru query getting data from Mas90 ODBC and also two maketable
querys

Any suggestions? I can us DoCmd but have to close each window of each query.
Thanks much.

Well, you don't need to - and shouldn't - "run" a Select query. You
run action queries - e.g. MakeTable or Append queries; a select query
can be opened to display the records onscreen, or simply used by
another Query, or by a Form or Report. If the maketable queries are
based on the select query, simply run the MakeTable query; there's no
need to reference the select query at all.
 
R

rob p

Hi. That means it is up to date everytime I open the db project? Is what I
see actually in my database project or am I just seeing what is in the ODBC
source table? thanks.
 
J

John Vinson

Hi. That means it is up to date everytime I open the db project? Is what I
see actually in my database project or am I just seeing what is in the ODBC
source table? thanks.

A Query has no independent existance. It's very much like a SQL or
ORACLE View - it dynamically retrieves data from the table, at the
instant that it is invoked.
 

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