Clear All Checkboxes

S

Steve CH6

I have a checklist that if a certain line is checked, i.e. a checkbox is
checked, indicating inclusion a report will be generated of all checked
items. However, when a user has completed the checklist I want the list to
reset by unchecking all boxes in preperation for the next user.
I tried this with "Setvalue" in the macros, but it only will change the line
your on. I want all of the boxes unchecked in one fell swoop, either on exit,
or on open.

"Select for Print" is the checkbox field in the table and form and "All
Index Items" is the table, and form name "All Index Items"

Any ideas?
Thank you for any help, Steve
 
J

John Spencer

If you want ALL checkboxes cleared no matter WHO set them or WHEN use an
update query to set all the fields in the table to false (0).

One problem with this in a multi-user database is that you will clear
everyone's checkboxes. So if Bob has checked items 2,3, and 5 and Tony checks
1,2, and 6 you are going to have a problem when Bob runs the report and closes
the form.

If this is a problem, then you can
Store a userid in the table when someone checks a checkbox. (problem here
is if two people check the same record)
OR
Add a table that stores the primary key of the record that is checked and
the userid of the person checking. Now you can clear the checks by person.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 

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