Solved

Create dynamic query form?

Posted on 2014-12-03
5
267 Views
Last Modified: 2014-12-04
Is there a way in Access to create a dynamic query form something like the attachment I've embedded?

Form example
0
Comment
Question by:SteveL13
5 Comments
 
LVL 18

Accepted Solution

by:
Simon earned 167 total points
ID: 40479711
Certainly possible, but why do you want to do it? I ask because if you have an appropriate BOUND form you could use 'Filter by form' more quickly.

There are other threads and articles on EE that describe how to build dynamic criteria forms
e.g. Using a Criteria Form to Filter Records
0
 
LVL 26

Assisted Solution

by:Nick67
Nick67 earned 167 total points
ID: 40479731
It's certainly possible.
Of course, the very best example of how to do it is Access's own Query Editor.
It's a superlative piece of UI.
What operational need would require going to the immense effort of recreating it?
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 166 total points
ID: 40480586
This question comes up quite a lot.

While it sounds like a great idea, ...after deeper consideration you will quickly realize that it will be more complicated than you expected.
Equals
Not Equals
Contains/ (Like)
Does not contain
Begins with
Ends with
Text searches
Numeric searches
Multi table Join queries
Aggregation
...etc

The Idea here is to create a "Natural Language" query builder for your users, ...correct?
The "simpler" you make it for your users, ...the more difficult this becomes for you to design.
Many "Natural Language" query builders have been created in the past, ...but none really ever caught on in the mainstream.
See here (http://en.wikipedia.org/wiki/Natural_language_user_interface)
...Specifically under the section called "Challenges".

You can certainly create something very "simple", ...but users will always want/need more.

These types of systems are typically based on "Filtering", ...not really based on building a complete query.
See Here (Parts 4 5 and 6)
http://www.fontstuff.com/access/acctut17.htm

In the end, you will realize that it is far easier to just educate your users on how to use the query builder.
Either that or create something "simple", ...then for any users who need more, ...you can teach them the query builder. (Where almost anything is possible)
;-)

Ultimately, ...for me at least, Learning SQL might be the solution...
SQL is more or less universal, ..so at the higher end, ...some things are just not possible in the Access QBE (Query By Example) grid, ...and can only be done with SQL.
;-)

JeffCoachman
0
 
LVL 31

Expert Comment

by:Helen_Feddema
ID: 40480600
Not sure exactly what you need, but my Fancy Filters sample database might be helpful; it allows users to select values of various data types from combo boxes, and creates a filtered query, displaying the results in a subform.  Here is the link for downloading it:

http://www.helenfeddema.com/Files/accarch129.zip

and here is a screen shot of the form:
Fancy Filters form
0
 

Author Closing Comment

by:SteveL13
ID: 40480752
Thanks for the advise.  I'm going to use the built in Query Designer.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question