Creating a query form.

P

philman

I would like to create a form that allows the user to select a field or
fields that they want to see within a list box (the SELECT part of the query)
as well as what field or fields they want to subset by (the WHERE part of the
query). I also would like to incorporate the ability to select how to sort
the query. I have a general idea of how this would work.....user would
select field names from a series of combo boxes.....one for what fields to
display, one for what fields to subset by along with parameters to subset by
such as containment, equal to, less than, greater than, etc. and code the
query based upon those selections. Now I'm just looking for some place to
start. Does anyone know of any examples of such a thing, including code, to
get me started?
 
K

KARL DEWEY

Here are some post that might get you started.
Search on --
KARL DEWEY.option group
Then look into the post with these subject names --
Changing the criterion in a Query
Option group event
use option group to filter a report
Change group by field in query
one report can use many queies
 
P

philman

Thanks so much for the VERY thorough response! This is exactly what I was
looking for. The UI of the ERP software we use where I work has similar
capability and I was hoping to incorporate this in a smaller database I've
been working on that is also used at work. This would give my users the
capability to create their own queries in the absence of the QBE since they
are all using the runtime version of Access....plus they won't really need to
know SQL. I've never used the grid control but I'll take your suggestion and
look into that. I want to be able to query across multiple tables so this
should be an "interesting" project. As for the AND/OR part, I planned on
having an option group with just those two options to handle the selection
from the user but the code side of things will be quite a bit trickier! Wish
me luck and thanks again for your help!!!
 

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