How can I get a checked box value updated? 
Author Message
 How can I get a checked box value updated?


I have a little program that using the combo box to select the index
of a table and then do the update. On the table, I have a checked box
and now I am having problems of update the checked box value to the

Say my little program like this:

Private Sub cboUserName_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles

        Dim drCurr As DataRow
        Dim aFindValue(0) As Object

        'load the item to look up,and use the find method
        aFindValue(0) = cboUserName.SelectedItem(0)
        drCurr = mdtUser.Rows.Find(aFindValue)

        'load up the fields on the form
        txtUserName.Text = drCurr("UserID").ToString
        txtPassWord.Text = drCurr("PassWord").ToString
        txtFirstName.Text = drCurr("FirstName").ToString
        txtLastName.Text = drCurr("LastName").ToString
        txtGroup.Text = drCurr("GroupID").ToString
        ckDisableUser.Checked = drCurr("Disable_Flag").toBoolean

    End Sub

The last line of the program is actually a logic datatype in the
database and it is a checkbox in my window form. For the text box
part, I have no problem update the values, but the last
part(ckDisableUser) I cant update the value to the database. I test it
with toBoolean and toString, nothing works. Does anyone knows how to
make it work?

Thank you.


Wed, 21 Sep 2005 05:06:29 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Check for checked values in List Box

2. Check Box being checked if database value is equal to ON

3. Getting/Checking CRC values for files?

4. need help on getting the auto-increment value of a field BEFORE updating recordset

5. Getting value of auto-increment field after update

6. Getting Index from a List View check box

7. Getting Index from a List View check box

8. Check Box Update

9. Check Box Update - New

10. How to filter out zero values with check box

11. multiple values from check boxes

12. Macro to assign value to and sum up check box forms


Powered by phpBB® Forum Software