passing field names to a query

H

Harry Comber

I have a table with a large number of fields. I would
like to set up a macro using a dialog box to allow the
user to choose a field and pass the field name to a
simple "count by field value" query. This uses an
expression like [visit.Forms]![Variables]![ChooseVar]
which can pass a value. However Access interprets the
result as a parameter rather than a field name even if it
is in the field row on the query.
Is there any way in which I can pass field names to the
query from a form?

Harry
 

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