Is is possible to create an application in MS Access that generates a query?

I’m working with MS Access queries and I was wondering if it is possible to use access to create a user friendly application (something that looks like a form) which can be used to set the criteria for generating and running a query as opposed to using the design view to set the criteria (The QBE pane). Thanks.

Yes it’s possible.
You would have to have a table of the TABLES & FIELDS available in the DB (Or use VBA to build the list(s) dynamically), then use a VBA Script (Module) to combine the selections into an SQL statement and Create a Query with that SQL.

It’s rather advanced, and I’m not sure it would be worth the effort, BUT it could be some fun for You to work out the details and would be a GREAT learning experience in VBA scripting.

Enjoy!
:-D

One Response to “Is is possible to create an application in MS Access that generates a query?”

  1. Yes it’s possible.
    You would have to have a table of the TABLES & FIELDS available in the DB (Or use VBA to build the list(s) dynamically), then use a VBA Script (Module) to combine the selections into an SQL statement and Create a Query with that SQL.

    It’s rather advanced, and I’m not sure it would be worth the effort, BUT it could be some fun for You to work out the details and would be a GREAT learning experience in VBA scripting.

    Enjoy!
    :-D
    References :

Leave a Reply