Click here to Skip to main content
15,898,949 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i was trying Flight Ticket Booking System in VB.NET 2015 with Msaccess 2010. I had Qty textbox. If Qty was 3 then, i need to split the Qty like males Qty, Females Qty, Children Qty in Numericupdown Tool. Eg., If Qty (Text Box value) like 3, then i was split the Value male 2 (Numericupdown1 value) and then Female 1 (Numericupdown2 value). Then automatically, numericupdown should be disabled. When i change the Qty, then Numericupdown values are Enable.

What I have tried:

How can do that one. Please help me..?
Posted
Updated 21-Dec-19 5:34am
Comments
Richard MacCutchan 21-Dec-19 3:54am    
You have the logic in your question. You just need to add the code to enable or disable the various controls based on those conditions.

Use something like:
Dim amount As Integer

If Integer.TryParse(qtyTextBox.Text, amount) Then
   Numericupdown1.Enabled = (amount <= 3)
End If
 
Share this answer
 
Comments
Member 11045819 21-Dec-19 10:56am    
Thanks for your reply. I had more than one Numericupdown Tool. 3 is just an example. I need runtime value changing. when my Qty criteria meet the numericupdown1, all numericupdowns are change to disable mode.If numericupdown1 & numericupdown2 adding value should meet my Qty criteria, all numericupdowns are change to disable mode. Please help me.
Too slow (up and down) in this case; use (3) banks of radio buttons.

And adults and children make more sense than male, female, children (unless we're talking segregation).

And if it's a "party of 5 with 1 adult" than you can "compute" the rest.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900