By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,504 Members | 1,140 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,504 IT Pros & Developers. It's quick & easy.

determine fields of query based on form checkbox

P: n/a
Hey,

I have built a form that has certain combo and text boxes on it, which
a user specifies his criteria and then clicks on a search button to
run a query based on that criteria. To build to this, I want to add
check boxes on this form, with the names of some of the fields in my
query, where if unchecked, the query will still run like before, but
will not show the unchecked fields anymore.
Can I do this?

For example....

- If my query has ID/name/city/state/zip fields
- On the form, I enter ID = 1 but uncheck the city and state boxes
- The query will then show all records with ID = 1, but the city and
state columns will not be shown.

Any Ideas????

Thanks,

Matt
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Matthew" wrote
... To build to this, I want to add
check boxes on this form, with the
names of some of the fields in my
query, where if unchecked, the query
will still run like before, but will not
show the unchecked fields anymore.
Can I do this?


Yes, you can.

You will use VBA code to examine the user's entries and either construct or
modify an SQL statement (that's what a query is -- the Query Builder is just
a visual front end for easily constructing SQL). Without using code, I don't
think you can do what you want.

Larry Linson
Microsoft Access MVP
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.