473,382 Members | 1,809 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,382 software developers and data experts.

I got a big problem with my values , checkboxes

15
Ok, I have 5 categories each have their own price, example of the code:

Expand|Select|Wrap|Line Numbers
  1. If CHKcat1.Value = 1 Then
  2. LBLprice.Caption = "£20"
  3. LBLinfo.Caption = "Hello"
  4. Else
  5. LBLprice.Caption = ""
  6. LBLinfo.Caption = ""
  7. LBLpxvat.Caption = ""
  8. LBLtotalprice.Caption = ""
  9. End If
  10.  
  11. If CHKcat1.Value = 1 Then
  12. LBLtotal.Caption = ""
  13. Else
  14. LBLtotal.Caption = ""
  15. End If
  16.  
But I have 3 events, and each event must have different 'category price'

----
I have 2, first you select the event, then it brings you to the booking form, so I want it so that when an event is selected the price of the tickets(categories)



Would I have to edit each category so, CHKcat1 would have to be(I dont know the code correctly)

If event1.value = 1 and CHKcat1.Value = 1 Then
LBLtotal.Vaption = "50"
End if

but wouldnt i need to set every event in each category like

If event2.value = 1 and CHKcat1.Value = 1 Then
LBLtotal.Vaption = "50"
End if
If event3.value = 1 and CHKcat1.Value = 1 Then
LBLtotal.Vaption = "50"
End if

etc



But obviously VB won't recognise that, so wondering if anyone would know the solution?
Mar 26 '08 #1
1 888
carl2k2
15
As I have been testing this :), I came up with this code, and so far seems to work, although I still need to test it, but am I going along the right lines??

Expand|Select|Wrap|Line Numbers
  1. If (Form2.Check1.Value = 1) And (CHKcat1.Value = 1) Then
  2. LBLprice.Caption = "£20.00"
  3. LBLinfo.Caption = "Hello"
  4. End If
Mar 26 '08 #2

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

Similar topics

3
by: Bryan Wood | last post by:
I am developing a regisration page that will present a set of check boxes to the viewer. This list of checkboxes is developed from a list in a database so the amount and names of the boxes will...
1
by: rdlauer | last post by:
I've just run into a strange problem with IE 6 and I'm wondering if anyone else has seen the same: On my form I have a hidden field that contains the HTML for a series of checkboxes: <input...
2
by: Alan Lambert | last post by:
I have a web page that contains, amongst other things, a DropDownList called drpProjectCodes) and a Panel (called pnlStatus) which contains six Checkboxes. drpProjectCodes contains a list of...
0
by: Benjamin Bittner | last post by:
Hallo NG, ive searched a lot in some google groups, and found many threads, but nothing that helped me. Here is the scenario: I have an aspx page which loads a user control in page.onInit like...
3
by: Michael Loughry | last post by:
I'm working for a company in Houston developing a web application. At one point in the code, we have to refresh the page, but save what checkboxes have been selected. Since these checkboxes are...
2
by: clinttoris | last post by:
Hello, If someone could help me it would be appreciated as I am not having much luck. I'm struggling with my asp code and have some questions relating to asp and oracle database. First...
3
by: somaskarthic | last post by:
Hi How to get the values of dynamically created checkboxes which are checked and unchecked (for both the conditions). Only the selected checkbox values are posted as 'On' . How can i get the value...
5
by: ameshkin | last post by:
What I want to do is very simple, but I'm pretty new at PHP and its a little hard for me. I have one page, where there are a rows of checkboxes. A button selects all checkboxes, and then...
1
by: ttamilvanan81 | last post by:
Hai i have using the checkbox in for loop. I need the urgent help from anyone, for example in the loop there is having 5 checkbox if i checked 3 of the ckeckboxes and 2 of the checkboxes are...
2
by: monette | last post by:
this is the sample of my script: I have 2 forms being called in one php file. the first form is used to store values to my database. the second form which is at the bottom used to call a report...
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: 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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...

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.