ZombeWalker71
New member
- Local time
- Today, 23:48
- Joined
- Mar 13, 2020
- Messages
- 5
Hi, I have a continuous form that has a checkbox field on each row called 'Specials', When a user clicks a button in the Form Header, I want is to display a message asking the user if they want to remove the selections they have made. If they click Yes, the checkbox will update checkbox to False on ALL records
If they chose No, the data stays as it it is.
My code at the moment only updates the first record it finds, could someone tweak the code for me to loop through the entire recordset and change any checkboxes marked as true to false please
If they chose No, the data stays as it it is.
My code at the moment only updates the first record it finds, could someone tweak the code for me to loop through the entire recordset and change any checkboxes marked as true to false please
Code:
Private Sub Cmd_Reset_Selections_Click()
On Error GoTo Err_Cmd_Reset_Selections_Click
If MsgBox( _
"Do you want to remove the selections you have made?", _
vbYesNo, _
"Update Selections?") _
= vbYes _
Then
Me.Specials = False
Me.Dirty = False ' save record
End If
Exit_Cmd_Reset_Selections_Click:
Exit Sub
Err_Cmd_Reset_Selections_Click:
MsgBox Err.Description
Resume Exit_Cmd_Reset_Selections_Click
End Sub