473,320 Members | 2,071 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,320 software developers and data experts.

Check a checkbox when an item in a combobox is selected

3
How do I make specific checkboxes be checked when I select an entry in a combobox? Like if I select entry 1 checkbox 1 and 3 will be checked if entry 2 then 3 and 4 be checked? So far I'm encountering a problem that when I change the combobox entry the checboxes that were checked stay checked.

Here's the code from the sub it's related to if that helps

Expand|Select|Wrap|Line Numbers
  1. Private Sub getProgramsNamount(strProgID As String, dblDuration As Double)
  2.    Dim strProgramName As String
  3.    Dim dblPrice As Double
  4.  
  5.     If strProgID.Contains("N") Then
  6.        strProgramName = "None"
  7.     End If
  8.  
  9.     If strProgID.Contains("C") Then
  10.        strProgramName = "Cycling "
  11.        dblPrice = dblDuration * 10
  12.     End If
  13.  
  14.     If strProgID.Contains("W") Then
  15.        strProgramName = strProgramName + "Weight Loss "
  16.        dblPrice = dblPrice + (dblDuration * 15)
  17.     End If
  18.  
  19.     If strProgID.Contains("K") Then
  20.        strProgramName = strProgramName + "Kick Boxing"
  21.        dblPrice = dblPrice + (dblDuration * 25)
  22.     End If
  23.  
Nov 8 '13 #1
0 1197

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

Similar topics

0
by: Stanley J Mroczek | last post by:
How do I mark the item that selected in the dropdownlist . the state is is ny and i want to mark was selected on the first page. If Page.IsPostBack = False Then Dim statefile As CustomersDB...
0
by: Empire City | last post by:
I have an ASP.NET form with a DataGrid and Button. I want to put a RadioButtonList in a DataGrid cell. I bind it to an ArrayList which has a ListItem in the cell. The display part works fine. I...
2
by: martin | last post by:
Hi, I am looking for a method to check if an item (any item) is selected in a particular listbox before deleteing it from my database, however I keep getting errors, The code I have is ...
1
by: .NETn00b | last post by:
Is this possible? I need to create a multi-select DataGrid, and I cannot use CheckBoxes. I want the selected rows to appear highlighted. One possible work-around that occurred to me was to...
4
by: cwoll | last post by:
I am runing this function to toggle buttens to display an "X" when they is selected, the butten is linked to a yes/no field. This function works good, the problem I am having is that when I make a...
0
by: axas | last post by:
After a deselection of all the items of a listbox, the first item appears selected again. How can I fix it????
4
by: hhak | last post by:
Hi all, Im pretty new to C#, im trying to assign a combobox selected value to a int variable. int number; combobox has items added (1,2,3,4,...9) when i select a number from the combobox i...
4
by: db2dbdba | last post by:
Hi All, How can I check for when a db2stop command is last issued? Or when a db2 force applications all command is last issued? Thanks in advance R
2
by: tvnaidu | last post by:
How can I disable checkbox when it is selected Kernel?. <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td align="right" width="40%" valign="top"...
4
by: chinni1 | last post by:
I Have 2 comboboxes in my form.The first combobox1 shoud be fill with the mainproduts which is cmng from database.By selecting The mainproduct the related sub product shoud dispaly in second...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.