Selecting/Deselecting All Checkboxes in a form

Sangie

New member
Local time
Yesterday, 18:53
Joined
Sep 24, 2009
Messages
3
My Database: We have a Customer Retail db that contains cust info as well as the services we did for them. It has 4 qrys for cust follow-ups: 2day, 2wk, 6mo, and 1yr....So for ex: When I click "2 Day Follow-up", it pulls up a Continuous Form that lists all cust which require a 2 Day followup with a checkbox to the left - so when checked, the cust is removed from the list. I also have a Rpt created that the employees can print & go thru the list as they followup with the customers throughout the workday and at the end of the day, they go back into the database & check all the names off their list....I have been requested to add a "Check All" box since some of our employees have a long list of customers.

Here's my problem: I wrote a VB code, but when I check the master checkbox, it only checks the selected record - it doesn't check all the customers that are on the list. :(

Here is what I have: The followup yes/no field (named ACCOUNT_FU2D) on the followup form. I created a checkbox object (named MasterCkBx) using the following code On Click:

Private Sub MasterCkBx_Click()

'Turns all of the checkboxes on or off using Check All (MasterCkBx) button.

If Me.MasterCkBx = True Then
Me.ACCOUNT_FU2D = True

ElseIf Me.MasterCkBx = False Then
Me.ACCOUNT_FU2D = False

End If

End Sub



I'm still kinda new at this Access & VBA stuff....how do I "loop" so it checks all the records on the continuous form?? What am I missing? I can't find ANYTHING on this particular issue anywhere! :confused: Thanks!
 
Have a look in help
RecordsetClone - These are the records as you can currently see them...

Loop through each one
set that column = true
update

If you find this a little complex post back and I will write you a Sub as a example
 
Just use an update query.
 

Users who are viewing this thread

Back
Top Bottom