0
votes

I have an access database that uses a continuous subform on a form. The continuous subform contains a date field followed by three check boxes that link to the single date field. The user must be able to enter as many dates as they need to and check the appropriate boxes which will pull in that date into the associated field in the table. If the user clicks all three check boxes connected to any of the date fields is there a way to make a field on the actual form "True". For example:

Continuous Subform

Date       Field1    Field2    Field3

1/1/2010      X

1/2/2010                X

1/3/2010                          X

Form

Field1 = True

1
where are they entering the dates? onto the continuous form itself as new records? - Patrick
Are you telling us that if any row on the subform has all 3 boxes checked, Field1 on the parent form will be True? And if no row on the subform has all 3 boxes checked, Field1 on the parent form will be False? - HansUp
They enter the dates on the continuous form. - Alicia
HansUp yes that is what I am saying but in addition to that field1 on the form is true if the all three fields on the subform are true under any date. Meaning that the continuous form has four fields the date field and three check boxes which constantly show a new row of a date field and three check boxes for the user. they can have three different check boxes that are basically on three separate continuous subforms. Does that make sense? - Alicia
THe fields are all bound to a table in the form and subform - Alicia

1 Answers

0
votes

What you want to do is this:

  1. add an After_Update event to each of those check boxes, have it launch a Sub (so that you don't have to put the same code in each checkbox)
  2. in the Sub that you create, walk the recordset for the subform and checks that exactly one checkbox in each of the rows/columns is checked.
  3. If it's prefect update the value on the parent form. e.g.,

    Me.Parent!Field1= true