Home > Back-end >  How can I reset the checkbox to the default value?
How can I reset the checkbox to the default value?

Time:10-28

I have the following code, and if none of the If or ElseIf statements are satisfied, I'd like the checkbox to return to its original state. When you first view the checkboxes in an untouched state, they are filled in with a black box. Once touched/updated, they go to either a checked or empty state. Hoping this makes sense. Thanks!

Private Sub cgvhd_lim_AfterUpdate()
If cgvhd_lim Then
    cgvhd_limext = "Limited"
ElseIf cgvhd_ext1 Then
    cgvhd_limext = "Extensive"
ElseIf cgvhd_ext2 Then
    cgvhd_limext = "Extensive"
ElseIf cgvhd_ext3 Then
    cgvhd_limext = "Extensive"
ElseIf cgvhd_ext4 Then
    cgvhd_limext = "Extensive"
ElseIf cgvhd_ext5 Then
    cgvhd_limext = "Extensive"
Else
    cgvhd_limext = 0
End If
End Sub

CodePudding user response:

To return a checkbox to its default state:

cgvhd_lim = Null
  • Related