|
-
Aug 20th, 2004, 02:56 PM
#1
Thread Starter
Hyperactive Member
Update a checkbox?
How do you update a checkbox? This is what I have, but it doesn't work:
Code:
Update_tblCapRec = "UPDATE tblCapRec SET InGDB = cbInGDB.Checked WHERE CaseNumber='" & txtCaseNum.Text & "'" & " AND PartNumber ='" & txtPartNum.Text & "'"
Thanks!
-
Aug 20th, 2004, 03:03 PM
#2
What is the datatype of InGDB?
Regardless, you need to concatenate the vaule of the CheckBox to the SQL string, like you do for the Case and Part Numbers.
Update_tblCapRec = "UPDATE tblCapRec SET InGDB = " & cbInGDB.Value & " Where ....
-
Aug 20th, 2004, 03:47 PM
#3
Thread Starter
Hyperactive Member
.Value doesn't work and neither does this:
" & cnInGDB.Checked & "
What else can I do?
Code:
Update_tblCapRec = "UPDATE tblCapRec SET InGDB = " & cbInGDB.Checked & " WHERE CaseNumber='" & txtCaseNum.Text & "'AND PartNumber ='" & txtPartNum.Text & "'"
What other things could it be?
.CheckState???
HELP! Thanks!
-
Aug 20th, 2004, 03:59 PM
#4
Thread Starter
Hyperactive Member
.CheckState works perfect! Thanks!
-
Aug 20th, 2004, 04:06 PM
#5
Do you understand why CheckState works but not Checked.
Or do you even care?
-
Aug 20th, 2004, 04:13 PM
#6
Thread Starter
Hyperactive Member
I think one equals a value of 1 or 0 and the other True or False. Is that right? That is what it said when I was debugging.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|