I wonder how can I list all the column names for a given table using a single query? I know how to do it in SQL using system tables, but no idea how to do that in Access.
dim db as dao.database
dim rs as dao.recordset
dim ij as integer
set db=currentdb
set rs=db.openrecord("your SQL string",dbopensnapshot)
for ij= 1 to rs.fieldcount
debug.priint rs.fields(ij-1).name
next
db.close
rs.close
set db=nothing
set rs=nothing
'something like the foregoing will get you started