Jump to content

help with VB program


Recommended Posts

hi everyone, here goes

im designing a program for wooden toys ltd, but im so stressed out with family problems that i cant think. and i need assistance asap.

i have two forms on this program, the first one you must enter a password the password at the minute is "OrderForm" i will change this when the program is complete, as soon as the correct password is entered a second form is loaded, this is an order form. i have some code already entered

what im wanting to do is, the customer selects there account number and their address is displayed in a list box (which i have done), then they choose which product they wish to order which then displays the product information in another list box (which i have also done), i have also programmed the two clear buttons, then i want them to enter the quantity required then i want the program to add these up then add vat at 17.5% and then display the total price, then display all of this in a list box on the left. i have included my program in this thread, requires visual basic to run.

if anyone could help me that would be great, thanks

if you need anymore imformation PM me

Wooden_toys_ltd.zip

Link to comment
Share on other sites

  • 2 weeks later...

Here this is what i came up with

Dim BB As Integer
Dim FS As Integer
Dim TS As Integer
BB = 15 'Set Price you want
FS = 25 'Set Price you want
TS = 33 'Set Price you want
Dim PriceBB As Integer
PriceBB = BB * txtQuantity.Text
Dim PriceFS As Integer
PriceFS = FS * txtQuantity.Text
Dim PriceTS As Integer
PriceTS = TS * txtQuantity.Text
If lstDetails.Items.Contains("Building Blocks") Then
lblPrice.Text = PriceBB
ElseIf lstDetails.Items.Contains("Farm Set") Then
lblPrice.Text = PriceFS
ElseIf lstDetails.Items.Contains("Train Set") Then
lblPrice.Text = PriceTS
End If
lblVat.Text = (lblPrice.Text * 0.175)
lblTotalPrice.Text = (lblPrice.Text * 117.5) / 100

This code works but it isnt what your really looking for

it will show you the price + Vat and the total price

but it can only do this for one item in the list

im still a noob in VB so maybe you can fix this code to suit your needs or see what others have to say!

Edited by shooter468
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...