I have a code here but it's not working. What I'm trying to do is when the message box appeared and ask if i want to proceed and choose no then the selected checkbox will be change the value into false.
If e.ColumnIndex = 0 Then
If e.RowIndex >= 0 And e.RowIndex <= Me.dgDispatchPosting.RowCount - 1 Then
If Me.dgDispatchPosting.Item("Approve_Status", e.RowIndex).Value <> "No Action" Then
If Me.dgDispatchPosting.Item("chkSelect", e.RowIndex).Value = False Then
If MsgBox("This Dispatch Code has been " & vbCrLf & "Do you want to proceed? " & Me.dgDispatchPosting.Item("Approve_status", e.RowIndex).Value & "!", vbQuestion + vbYesNo, "Courier Dispatch Summary ") = MsgBoxResult.No Then
Me.dgDispatchPosting.Item("chkSelect", e.RowIndex).Value = False 'Must change the value here (Uncheck)
End If
End If
End If
End If
End If