I have been on here before and the help was fantastic.
Here is my problem, i have a database which as several forms on it, one of which is a form with a subform. The subform, onLoad is populated with the full recordset of a table which keeps track of which desks are researchers occupy. On the main part of the form is a combobox which is populated with text as a value list. When the user selects say "This Week" from the combobox the subform is filtered with all the desks which should be vacated this week. There are other options like "This Month, Next Month" and so on. The subform is filtered with a relevant query which in turn has a date criteria attached to it. This part works fine and i can also send bulk emails to the recipients shown in the filtered subform to tell them there "vacate desk" date is due. The part I am struggling with is this, on the data shown in the subform there is a checkbox(bound to the underlying table) which when i select the checkbox(chkDeskVacated) of any of the records in the filtered subform allows me to archive the persons which have vacated their desk. The append and delete query work fine but it needs refining. What i would like to do when i click the archive button is the following:
1. A message box displays, saying i have selected "X" records for archiving. Do you wish to proceed to archive? If VBNo then exit sub. If vbYes then execute the append and delete queries
I am able to select the checkboxes in the subform, but i am struggling to code on how to count the number of checkboxes that are "True" and pass this to the message box indicating to the user how many records they have selected to archive. If I can get this part right, then all I need to do is to archive the records i have selected in the filtered subform. Then I just need to refresh the form to show the updated records.This again is a part of the code I am unsure of. I have tried the requery![]()
method but it does not work. Any help would be greatfully appreciated.