Can a query be ran by check boxes in a form?

T

Thanks, Jeff

I have a database that I am trying to create a Form with various check box
options to run a query, so the user can select which options they want to
include on the query. Check boxes would have unique names for each, and
would relate either to the fields needed on the query from the Table it is
going to query. (For exmaple, feild name = Item Number, would add the Item
Number field to the query.) Another check box would be a criteria set for
that query, so if checked the query would require a Item Number Parameter
value to be entered so only that item number is pulled on the query. I will
have about 20 different fields and possible criteria (and OR options) on the
form.
 
J

John W. Vinson

On Fri, 8 May 2009 14:36:08 -0700, Thanks, Jeff <Thanks,
I have a database that I am trying to create a Form with various check box
options to run a query, so the user can select which options they want to
include on the query. Check boxes would have unique names for each, and
would relate either to the fields needed on the query from the Table it is
going to query. (For exmaple, feild name = Item Number, would add the Item
Number field to the query.) Another check box would be a criteria set for
that query, so if checked the query would require a Item Number Parameter
value to be entered so only that item number is pulled on the query. I will
have about 20 different fields and possible criteria (and OR options) on the
form.

Your code will need to loop through the form's Controls collection and
dynamically build an appropriate SQL string. It would probably be harder for
the user than training the user to create a query in the query design window,
and unless you go to extraordinary effort it would be considerably less
powerful! What's the nature of the data, and why do you consider this checkbox
interface to be essential?
 

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