Solved

Create dynamic query form?

Posted on 2014-12-03
5
228 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:
SimonAdept earned 167 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks for the advise.  I'm going to use the built in Query Designer.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now