List fields in a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I know there is a way to list the fields in a query, but I can't quite get
the code right. Can someone please post a way to do this?

Actually, what I am trying to do is check to see if a column exists in the
query.

Thanks.

Paco
 
Paco

Where are you trying to create this list?

Have you looked at the Database Documentor?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
We're setting report filters against the report recordsource and I am writing
a generic piece of code to build the WHERE clause for the filter. If the
WHERE clause contains a field that is not in the recordsource query, it is
treated as a parameter. I want to skip adding a filter that may be selected
if that field is not in the recordsource query.

I'm doing this by using FOR NEXT to loop through all the fields in the
recordsource query to determine if the filter field exists in the query, but
I thought there might be a simpler way. Actually, the FOR NEXT loop is pretty
quick, so that may be the best solution.

Thanks.

Paco
 
Back
Top