Based on Multiple check boxes change the value of Main check box

godknow

Registered User.
Local time
Today, 17:42
Joined
Jun 26, 2012
Messages
15
Based on Multiple check boxes change the value of Main check box(completed)


i have a table with fields
Name | ID | Completed (true or false check box) | check box 1 | check box 2 | check Box 3 |

now what i want to do is, if the check box 1,2,3 are true, change the value to true in completed field automatically.

how do i write function.
&
where should i write it.
 
There should NOT be a completed checkbox. If it is based on all checkboxes being done, you should use a query to check to see if they are all complete at runtime. The extra field is extraneous and can cause your data to be unreliable.
 
There should NOT be a completed checkbox. If it is based on all checkboxes being done, you should use a query to check to see if they are all complete at runtime. The extra field is extraneous and can cause your data to be unreliable.

so how would i write a query
 
There should NOT be a completed checkbox. If it is based on all checkboxes being done, you should use a query to check to see if they are all complete at runtime. The extra field is extraneous and can cause your data to be unreliable.

OK got it. But i would be helpful to know if that person is completed the the task or not by looking at the completed check box.
Is there any better way to know, if the person is completed or not?
 
OK got it. But i would be helpful to know if that person is completed the the task or not by looking at the completed check box or is there any better way to know
if the person is completed or not.
1. You, and others, shouldn't be working in the table directly.

2. You would use a form (Single form view) and that form can have a checkbox and in the form's ON CURRENT event you could check to see if the values are all checked and display an unbound checkbox which can then show as complete by using some code like this:
Code:
Private Sub Form_Current()
   If Me.FieldName1Here And Me.FieldName2Here And Me.FieldName3Here Then
      Me.chkCompleted = True
   Else
      Me.chkCompleted = False
   End If
End Sub
And then the same in the form's After Update event.
 
1. You, and others, shouldn't be working in the table directly.

2. You would use a form (Single form view) and that form can have a checkbox and in the form's ON CURRENT event you could check to see if the values are all checked and display an unbound checkbox which can then show as complete by using some code like this:
Code:
Private Sub Form_Current()
   If Me.FieldName1Here And Me.FieldName2Here And Me.FieldName3Here Then
      Me.chkCompleted = True
   Else
      Me.chkCompleted = False
   End If
End Sub
And then the same in the form's After Update event.

i didn't got that
 

Users who are viewing this thread

Back
Top Bottom