| | |
Checkbox on database
![]() |
•
•
Join Date: Jul 2007
Posts: 23
Reputation:
Solved Threads: 0
Hi there
I'm now using Microsoft Access and i have a column called VT. I stored it into a variable called vibrotactile.
The problem is the column contains checkboxes. If my VT column is not checked, it will carry out Case 1. Else, if my VT column is checked, it will carry out Case 2. How do i put it into codes? I tried to put 'if vibrotactile = false' and 'if vibrotactile = true'. But it doesn't seem to work. How do i go about it?
I'm now using Microsoft Access and i have a column called VT. I stored it into a variable called vibrotactile.
vibrotactile = ds.Tables("maskingSimulator").Rows(s).Item("VT")The problem is the column contains checkboxes. If my VT column is not checked, it will carry out Case 1. Else, if my VT column is checked, it will carry out Case 2. How do i put it into codes? I tried to put 'if vibrotactile = false' and 'if vibrotactile = true'. But it doesn't seem to work. How do i go about it?
VB.NET Syntax (Toggle Plain Text)
If vibrotactile = False Then 'Case 1 acTestEarThreshold = acTestEarThreshold End If If vibrotactile = True Then 'Case 2 If acTestEarThreshold <= 20 Then acTestEarThreshold = acTestEarThreshold ElseIf acTestEarThreshold > 20 Then acTestEarThreshold = 20 End If End If
•
•
•
•
Hi there
I'm now using Microsoft Access and i have a column called VT. I stored it into a variable called vibrotactile.
vibrotactile = ds.Tables("maskingSimulator").Rows(s).Item("VT")
The problem is the column contains checkboxes. If my VT column is not checked, it will carry out Case 1. Else, if my VT column is checked, it will carry out Case 2. How do i put it into codes? I tried to put 'if vibrotactile = false' and 'if vibrotactile = true'. But it doesn't seem to work. How do i go about it?
VB.NET Syntax (Toggle Plain Text)
If vibrotactile = False Then 'Case 1 acTestEarThreshold = acTestEarThreshold End If If vibrotactile = True Then 'Case 2 If acTestEarThreshold <= 20 Then acTestEarThreshold = acTestEarThreshold ElseIf acTestEarThreshold > 20 Then acTestEarThreshold = 20 End If End If
You haven't mentioned or used the checkbox any where in your code. Any ways, Your check box may got some other ID but Im using here yourCheckBox as an ID.
So Now,
If vibrotactile.yourCheckBox.checked = False Then
'Case 1
acTestEarThreshold = acTestEarThreshold
End If
If vibrotactile.yourCheckBox.checked = True Then
'Case 2
If acTestEarThreshold <= 20 Then
acTestEarThreshold = acTestEarThreshold
ElseIf acTestEarThreshold > 20 Then
acTestEarThreshold = 20
End If
End If
I Hope it'll work.
Regards,
Shikeb Ali
------------------------------------------
“Beware the fury of a patient man.”
Shikeb Ali
------------------------------------------
“Beware the fury of a patient man.”
Hi again,
fortunately I managed to run it ... but i did it in C#, its like this,
It was working fine.
I Hope you'll get something out from it and that it'll work for you.
fortunately I managed to run it ... but i did it in C#, its like this,
VB.NET Syntax (Toggle Plain Text)
if (vibrotactile.myCheckBox.Checked == false) { acTestEarThreshold = acTestEarThreshold; } else { If (acTestEarThreshold <= 20) { acTestEarThreshold = acTestEarThreshold; } else { acTestEarThreshold = 20; } }
It was working fine.
I Hope you'll get something out from it and that it'll work for you.
Regards,
Shikeb Ali
------------------------------------------
“Beware the fury of a patient man.”
Shikeb Ali
------------------------------------------
“Beware the fury of a patient man.”
•
•
Join Date: Jul 2007
Posts: 23
Reputation:
Solved Threads: 0
Hi
thanks for the help. Really appreciate it. I've managed to get it out. Here's what i did to it
thanks for the help. Really appreciate it. I've managed to get it out. Here's what i did to it
VB.NET Syntax (Toggle Plain Text)
If vibrotactile Then 'Case 2 If acTestEarThreshold <= 20 Then acTestEarThreshold = acTestEarThreshold ElseIf acTestEarThreshold > 20 Then acTestEarThreshold = 20 End If Else 'Case 1 acTestEarThreshold = acTestEarThreshold End If End If
![]() |
Similar Threads
- inserting multiple selection from checkbox in to one column (JSP)
- Custom Database Admin Tool. (PHP)
- urgent... (VB.NET)
- submiting info into a database for retrieval! (PHP)
- passing checkbox value to next page (PHP)
- filter recordset with checkbox using SQL (Visual Basic 4 / 5 / 6)
- Help with Dynamic Checkbox (PHP)
- recordset from multiple checkbox values (ASP)
- checkbox values (JSP)
Other Threads in the VB.NET Forum
- Previous Thread: Crystal report setconnection and parameter problem
- Next Thread: Audio file
Views: 2655 | Replies: 6
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
.net .net2008 2005 2008 access ado.net ajax application array arrays basic bindingsource browser c# center checkbox client code combobox communication connection control convert crystal crystalreport data database datagrid datagridview dataset datatable date datetimepicker design designer dissertation dissertations error excel file form gridview image images insert large listview login loops mobile ms msaccess net objects openxml path port print printing problem read save search security serial server settings sms socket sorting sql statement studio syntax tagging tags textbox time timer type update upload user validation vb vb.net vb2008 view visual visual-studio visualbasic visualbasic.net visualstudio2008 vs2008 web webbrowser windows winforms wpf xml





