Continuous Subform
I have an access database that uses a continuous subform on a form. The continuous subform contains a date field follo开发者_如何学Cwed 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
What you want to do is this:
- 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)
- 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.
If it's prefect update the value on the parent form. e.g.,
Me.Parent!Field1= true
精彩评论