473,626 Members | 3,031 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Check a checkbox when an item in a combobox is selected

3 New Member
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 1217

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

Similar topics

0
1171
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 = New CustomersDB type.DataSource = statefile.GetState type.DataBind()
0
1827
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 then check some boxes and hit the submit button. I can't seem to get the value that is selected on the RadioButton List. I don't want to use the EditTemplate thing I just want to click on the radiobutton and submit the form. I also don't want to do...
2
11696
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 lbSpecificProgram is a listbox.
1
2241
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 devise my code in such a way as to allow the user to click anywhere in a DataGrid row, which would check the CheckBox for that row. Similarly, clicking again in the same row would un-check the CheckBox. The CheckBoxes in question would be invisible,...
4
1986
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 new record the "X" from the last record I looked at are still there, but the bottens are not selected nether should they be. How do I clear every thing when creating a new record? Any help would be apprecated. Clarence Wollman Function...
0
1171
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
27912
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 want to assign this number to my integer variable. thanks in advance.
4
3742
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
5016
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" class="text1">Facility:</td> <td width="60%" valign="top" class="text1"> <select name="logConfig.facility" size="1" class="txtbox" id="selFacility"> <option $| web.dropdownSelected(configRow == "Kernel") |$ value="Kernel">Kernel</option> <option $|...
4
2271
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 combobox2. In form load written this code..... da = new SqlDataAdapter("select * from main_products", con); da.Fill(ds, "main"); da = new SqlDataAdapter("select * from sub_master", con); da.Fill(ds, "sub");
0
8196
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8637
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8364
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6122
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5571
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4090
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2623
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1507
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.