0
votes

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.enter image description here

1
What is the actual problem? Implementing "Select all"? What have you tried? Finding tutorials isn't really on-topic at SO.Andre
You can't really use a checkbox field bound to a Yes/No field - unless this is a one person database. The problem with using unbound fields is that if you change one in a datasheet or continuous subform, it updates them all. Finally - you can use the row selectors on the side - holding down the shift key to select multiples - but you can't cherry pick and skip rows - they have to be continuous. Best bet is to use @BitAccesser suggestion and the great example db with a class. Tough start to learn VBA - especially when tips are in German - but it does do exactly what you wantdbmitch
@Andre: I was trying to achieve exactly what BitAccesser's example is doing. Pardon my poor explanation.Chandan D Nadig

1 Answers

1
votes

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).