Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
1.07/5 (5 votes)
See more:
I do not the code for transfer the value of input box to the textbox in form and it must be assign as column..will submit my assignment at here...my lecture told to do individual...the example snapshot is given...can anyone pls help me on this issue....???

VB
Dim bread As Single
       bread = Val(InputBox("PLEASE ENTER THE QUANTITY OF BREAD:", "UNI10 MINI MART"))
       If bread > 10 Then
           MessageBox.Show("YOU ARE ONLY ALOW TO BUY MAXIMUM 10 ITEMS !!!")
       Else
           TextBox1.Text =

       End If

   End Sub



so far for one item i have made this..if the bread button is click,it must ask for number of quantity..thn transfer it to a temperory text box...and when clik a button it must calculate the total cost in another text box
Posted
Updated 21-Jul-14 2:01am
v2
Comments
Pheonyx 21-Jul-14 7:09am    
You will have been given enough information in your classes to know how to assign variables to things, in fact your code sample already does it. So if you read the information you have pasted then you should have no problems doing the first part of the assignment.
Again, the latter is just a case of reading your variables and doing the required maths.
Member 10960419 21-Jul-14 15:58pm    
here bro....my problem is now...my assignment is to create a Uni10 Mini Mart and build a simple cash register program. Your program should consist of the following functions:
1. Allow the user to enter number of types of items they are going to buy (maximum types of items is 10)
2. Allow the user to choose the items they are going to buy
3. Allow the user to enter quantity of each item
4. Display total of amount that need to be paid by user

for this...i made is....i make a button for each items..and if the button is click,the inputbox must apear and ask for the quantitiy for the specific items..curently we have 24 items as said in this assignment...thn....after input the value,i wana the quantity,the item name and the normal price to display in a temperory textbox..and there is a button ~cash out~ which must make the grand total of the selected item and print it.the grand total must be display in another textbox and there must got the current time and date bro...i duno how to link all the button ..and customer are only alow to choose only 10 items in a single receipt..it is realy connfusing bro..need to submit this in 4 days more bro..pls help me bro....if u could give your email address...it would be easy for me to send u the sample shot given by my lecture and the question and wat i have done so far.....my email address is, haneeshraj@gmail.com
SRS(The Coder) 21-Jul-14 8:02am    
so wats the problem, as you are getting the value in 'bread' variable itself ?
Member 10960419 21-Jul-14 15:57pm    
here bro....my problem is now...my assignment is to create a Uni10 Mini Mart and build a simple cash register program. Your program should consist of the following functions:
1. Allow the user to enter number of types of items they are going to buy (maximum types of items is 10)
2. Allow the user to choose the items they are going to buy
3. Allow the user to enter quantity of each item
4. Display total of amount that need to be paid by user

for this...i made is....i make a button for each items..and if the button is click,the inputbox must apear and ask for the quantitiy for the specific items..curently we have 24 items as said in this assignment...thn....after input the value,i wana the quantity,the item name and the normal price to display in a temperory textbox..and there is a button ~cash out~ which must make the grand total of the selected item and print it.the grand total must be display in another textbox and there must got the current time and date bro...i duno how to link all the button ..and customer are only alow to choose only 10 items in a single receipt..it is realy connfusing bro..need to submit this in 4 days more bro..pls help me bro....if u could give your email address...it would be easy for me to send u the sample shot given by my lecture and the question and wat i have done so far.....my email address is, haneeshraj@gmail.com

1 solution

Try this instead
VB
Dim bread As Single = InputBox("Please enter the amount of bread.", "Buy")
If bread > 10 Then
 MessageBox.Show("You may only buy 10 items at a time.", "Error", MessageBoxButtons.OK)
 TextBox1.Text = ""
Exit Sub
Else
 TextBox1.Text = bread
' Your code here
End If
 
Share this answer
 
v2
Comments
Member 10960419 21-Jul-14 16:07pm    
here bro....my problem is now...my assignment is to create a Uni10 Mini Mart and build a simple cash register program. Your program should consist of the following functions:
1. Allow the user to enter number of types of items they are going to buy (maximum types of items is 10)
2. Allow the user to choose the items they are going to buy
3. Allow the user to enter quantity of each item
4. Display total of amount that need to be paid by user

for this...i made is....i make a button for each items..and if the button is click,the inputbox must apear and ask for the quantitiy for the specific items..curently we have 24 items as said in this assignment...thn....after input the value,i wana the quantity,the item name and the normal price to display in a temperory textbox..and there is a button ~cash out~ which must make the grand total of the selected item and print it.the grand total must be display in another textbox and there must got the current time and date bro...i duno how to link all the button ..and customer are only alow to choose only 10 items in a single receipt..it is realy connfusing bro..need to submit this in 4 days more bro..pls help me bro....if u could give your email address...it would be easy for me to send u the sample shot given by my lecture and the question and wat i have done so far.....my email address is, haneeshraj@gmail.com .....currently your code work... but i want that to apear in a colum like...items,quantity,normal price...and if we click another button,the bread information must sill be there and if wana to remove,we must create a button to remove the selected item...if the selected items is fine..then we must click a cash out button which it will grand total the total cost and the list of purchased item and the quantity and print them out as a receit with the current date and time of purchasing...something to do like if we buy things in a supermarket bro..pls help me on this i am realy blur..i need to submit this assignment in 4 days more..uh!!!!!!!!!!!!!!!

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