From: Steve CH6 on
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
From: Sue on
Hi Steve

What I would do is an 'update' query, base this on your table and update the
field [Select for Print] to False (this clears the fields tickbox). Either
do it for all records in the table or you can set criteria in the query
grid. You would call this query from code on a relevant event, eg on close,
if that is what you want - basically what determines a checklist completed
and refresh required? To run the query you use in code: docmd.openquery
"queryname" - you would need to set the warnings to false before, and after
this line set them back to true so the update query does not prompt you to
perform the action.
eg
docmd.setwarnings false
docmd.openquery "queryname"
docmd.setwarnings true

Hope this helps, Sue.

"Steve CH6" <SteveCH6(a)discussions.microsoft.com> wrote in message
news:F45A6F59-C8FB-4BCC-B933-72D06B172B8A(a)microsoft.com...
>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


From: John Spencer on
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

Steve CH6 wrote:
> 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