Changing recordset based on multiple checkboxes

  • Thread starter Joseph Greenberg
  • Start date
J

Joseph Greenberg

I have a form with multiple checkboxes corresponding to various values in
one field. I'd like to be able to allow the user to change the underlying
recordsource by selecting checkboxes (which would trigger a new SQL
statement and associated requery).

For testing purposes I put a label on the form which collects the values in
that field that I'd like to have in the recordset, and deletes as checkboxes
are ticked or unticked. Not sure if this label woudl be helpful in building
the SQL. The maximum length of the label caption is 7 characters - the
possible values are M, A, C, I, S, X, D - any or all of them can be selected
(but obviously I'd like to ensure at least one is selected).

The "global" underlying recordsource is a query, if that matters.

Any thoughts about how to do this?
 
J

Jeanette Cunningham

This is very similar to the common search screens that access developers
use.
We usually use a combo or text box instead of a checkbox.

If you change the checkboxes to combos or textboxes, you can use the sample
search form here.
http://www.allenbrowne.com//ser-62.html

If you choose to stay with checkboxes, you can adapt the code from the
sample database above.



Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 

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