'Access Query: Parameterize whether or not to include field
At my job I often have to create Access queries that are customizable by the end user (without giving them access to the query builder.) I'm fine when it comes to passing parameters into the WHERE clause, but how can I let the user choose what goes into the SELECT and/or the GROUP BY clauses?
Currently, my solution is to collect the desired fields through a form, then rewrite the SQL of a saved query using DAO.QueryDef in VBA. But this is not ideal for a few reasons (needs to recompile every time, code can get pretty complex, etc.)
Anyone have any alternatives? Can anything be done with parameters here?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
