Clearing check boxes with a query.

Coach Ty

Registered User.
Local time
Today, 10:36
Joined
Aug 16, 2009
Messages
64
Hello,

I was wondering if someone can please tell me how to design a query that will clear or reset multiple check boxes on a single form?

I have a form that includes multiple check (True/False) boxes.
These boxes determine the steps that follow in the calculation process.

I'd like to design a reset button that will clear all prior entries, before running the calculations each time.

I'm thinking a reset button based on a query. But I'm not sure about how I should design the query.

Can anyone tell me how to do this?

Thanks for your help!
 
If the form is bound, it would be simpler to do this:

Me.CheckboxName = False

If you want to use a query, it would be an UPDATE query:

UPDATE TableName
SET FieldName = False
WHERE...
 
Thanks for your reply.

The form is bound and it contains many check boxes that are based on multiple tables. So the form is set to "Dynaset (inconsistent updates)"

I can see how your answer would clear one check box, but can you tell me how to design a single control to clear all of the check boxes on the form?

I want to list the control as a "Reset" button.

Thanks again for your help ...
 
Something along the lines of:

Code:
  Dim ctl As Control

  For Each ctl In Me.Controls 
    Select Case ctl.ControlType
      Case acCheckBox
        ctl = False
    End Select
  Next ctl
 

Users who are viewing this thread

Back
Top Bottom