Re: SELECT Queries. A straight answer.



On Sun, 21 Dec 2008 14:49:52 -0800, strongsilentone wrote:

Hi!

I'm a little bit frustrated as I know this should not be a difficult
task. I'm trying to execute queries from VBA without much luck so far.
I use doCmd.openQuery ("Query Name") and it runs without error, but It
doesn't seem willing to give me the results its returned either. I
can't seem to find a comprehensive tutorial on this subject (it should
hardly need to be all that comprehensive anyway). Any chance somebody
can steer me down the right path?

"Executing" a query normally refers to action queries (UPDATE, APPEND,
DELETE). "Opening" a query normally refers to a SELECT query.

Which is it you want to do? From code, Action queries would be the norm.

Please clarify "give me the results". Do you want the rows from a SELECT
query or the number of rows affected from an Action query?

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
.



Relevant Pages

  • Re: SELECT Queries. A straight answer.
    ...  I'm trying to execute queries from VBA without much luck so far. ... "Executing" a query normally refers to action queries (UPDATE, APPEND, ...
    (comp.databases.ms-access)
  • Re: RunSQL vs builder query
    ... Actually, depending on the query, saved queries are compiled and run faster. ... Although the VBA code is compiled, the SQL in a RunSQL line is not compiled. ... With action queries, it doesn't actually "open" them, it runs them. ...
    (microsoft.public.access.queries)
  • Re: Execute a query
    ... > We have recently converted a database from Lotus Approach to MS ... We are trying to create queries in order to search 6/7 ... > cannot figure out how to execute the query. ... Are these SELECT queries or Action queries? ...
    (microsoft.public.access.queries)
  • Re: Get External Access data
    ... queries are of 2 types: ... Action queries are those that change data: ... In addition, if a query utilizes a user-defined function (i.e., a custom ... Queries (referred to in the window as View) in it. ...
    (microsoft.public.excel)
  • RE: Dynamically referencing a recordset?
    ... through that recordset to set the query parameters in VBA. ... to be the one who had to modify 1440 queries if there is a change in the ... different table schema, then you need 3, one for each record type. ... This is a database that tracks the production on records in another ...
    (microsoft.public.access.modulesdaovba)

Loading