It is not a limitation, but the nature of the beast. Select and Crosstab
queries return rows, but Action queries do not. If it cannot return records,
it can't be seen as a recordset.

Signature
Dave Hargis, Microsoft Access MVP
> Im using db.queryDefs(x).Fields.count and db.queryDefs(x).Fields(x).Name to
> return information on fields within database queries.
[quoted text clipped - 5 lines]
>
> Thank you!!
LanceR - 07 Feb 2008 14:39 GMT
Hi Klatuu,
With your advise I was able to eliminate the thought of returning a list of
field names from my queries using: db.queryDefs(x).Fields(x).Name
As you said, this does not work for Update, Append or Make table queries.
After a little digging I was able to find a way to get at the field names
for the Action queries.
Db.QueryDefs(x).Name returns the name of all queries.
Using Db.QueryDefs(x).SQL I was able to return a sql statement for the
action queries which does contain all the field names in the query.
Using this sql string I then used a simple "instr()" function to search for
the field names I was interested in to see if they are in the query.
> It is not a limitation, but the nature of the beast. Select and Crosstab
> queries return rows, but Action queries do not. If it cannot return records,
[quoted text clipped - 9 lines]
> >
> > Thank you!!