How to use unbound checkbox in a Continuous Subfor

2020-02-11 11:45发布

问题:

I'm fairly new to Access and having a really hard time figuring out each and every bit of it. Now I want to have a grid containing rows fetched from a query and a checkbox for every row. Here's what I want:

  1. User should be able to select individual checkbox to select the row.
  2. A "Select all" checkbox to select all rows.
  3. Only upon clicking a button the rows must be updated

I have

  1. Created a form.
  2. Added a Continuous Subform and the Rowsource has a checkbox bound to a Yes/No field.

I'm stuck at this point. Please refer to the attached image and help me figure this out. Please suggest some good tutorials with practical examples. Thanks a lot.

回答1:

Use the clsCCRecordSelectclass from SelectRecordsV2. There are samples in the download db, but comments are in german lang (I can translate if needed). If you need advice in implementing this to your form show form.name, form recordsource and control names of detail section (you need one control with unique values to assing the checkboxes to a record, can be invisible).