473,378 Members | 1,119 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

enable multiple checkboxes by clicking option1

hi

i`d like to enable, and disable multiple (about 10-20) checkboxes when i click to option1.

my code:
Expand|Select|Wrap|Line Numbers
  1. .....option1...click...
  2. chbox1.enabled = true
  3. chbox2.enabled = true
  4. chbox3.enabled = false
  5. chbox4.enabled = false
  6. end sub
i get an error at the ".enable" in the second line, it works if i leave only one line, and delete the rest.
something is missing, but i dont know what is it.
i`ve tried to search on google, but with no luck.
please give a clear answer as im a newbie.

thanks
Jan 28 '12 #1

✓ answered by Guido Geurs

Are you using checkboxes with different names or checkboxes with the same name but with indexes?

5 2120
Guido Geurs
767 Expert 512MB
I see no problem so far.
Are the names of the checkboxes OK?
This is working in VB6 (see atachment for demo)
Expand|Select|Wrap|Line Numbers
  1. Private Sub Option1_Click()
  2.     Check1.Enabled = True
  3.     Check2.Enabled = True
  4.     Check3.Enabled = False
  5.     Check4.Enabled = False
  6. End Sub
  7.  
  8. Private Sub Option2_Click()
  9.     Check1.Enabled = False
  10.     Check2.Enabled = False
  11.     Check3.Enabled = True
  12.     Check4.Enabled = True
  13. End Sub
Attached Files
File Type: zip enable multiple checkboxes by clicking option_v1.zip (1.6 KB, 59 views)
Jan 29 '12 #2
Guido Geurs
767 Expert 512MB
Are you using checkboxes with different names or checkboxes with the same name but with indexes?
Jan 29 '12 #3
im using checkboxes with different names.
but im using raid control buttons in different frames insead of checkboxes.
thanks for the answer
Jan 30 '12 #4
Guido Geurs
767 Expert 512MB
You are saying "im using checkboxes" and "im using raid control buttons in different frames instead of checkboxes" ????
Is it possible to attach your program in Bytes?
Because there is a confusion in the use of names and terms!
Jan 30 '12 #5
im using raid control buttons instead of checkboxes.
but i marked a best answer anyway couse you care about my problem.
now i have way more coplicated (to me) problem.
thanks
sorry for the late response
Feb 11 '12 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Marc | last post by:
Okay, here's the problem - I have 3 radio buttons, and 11 check boxes (which are disabled by default). I have the javascript below which when the last radio button is clicked, enables the...
6
by: jeffsnox | last post by:
Hi, I have multiple checkboxes on the same form as follows: <input type='checkbox' name='cbtype' value='1'> <input type='checkbox' name='cbtype' value='2'> <input type='checkbox'...
4
by: ramapv | last post by:
can i highlight a checkbox from a group of checkbox with particular name which is given as a search key. I am having a list of checkboxes and i have to select some of them and form a group.but i'm...
4
by: favor08 | last post by:
I have a continious subform that 9000 + records and I have serveral check marks on the subform. so it ties to that record. Does anyone have any examples were they use multiple checkboxes in a ...
0
by: serghei | last post by:
I have already the insert form and the database. It's working to insert multiple data with multiple checkboxes. But I can't retrieve multiple data.
0
by: Ned Balzer | last post by:
Hi, Can anyone point me in the direction of a solution for validating multiple checkboxes in an asp.net 2.0 page? 1) This is not a checkboxlist, it is a number of separate checkboxes 2) I do...
3
by: santoshjsh | last post by:
hello everyone, i have a gridview in which i have multiple checkboxes in a single column. means for every row in the gridview i have four checkboxes in one column e.g Add, Delete, Print,...
3
by: raamay | last post by:
hey experts, please advise me what is the best way to save multiple checkboxes value in a database. I have 6 checkboxes and i came across storing the values in a single column of a table which i dont...
0
by: kimmelsd33 | last post by:
I am adding to my software. I have placed about 30 checkboxes on a form. Based on which checkboxes are selected, I want to print the values to a tab delimited text file. For instance, the first...
12
by: BabyLucifer666 | last post by:
Hello All, (using Access2000) I have a form with multiple unbound checkboxes. What I would like to do is have the user check whoever needs to take a specific training course. My database is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.