muhdKarim 0 Newbie Poster

Need some help on VBP6 Mail Order Code I'M loss with coding

Anyone can help

Visual Basic 6

Visual Basic 6

VBP Assignment
Mail Order
As a member of a development team involved in setting up the accounting and
financial systems for a new mail order business for household items, your task is to
develop an application to calculate the amount due for each order. The specifications
for the application are described below.

For an order, the user should enter the following information into text boxes:
customer name, address, city, state, and postal code. An order may consist of
multiple items. For each item, the user will enter the product description, quantity,
weight, and price into text boxes. You will need command buttons for Next Item,
Update Summary, Print, and Exi t.

For the Next Item button, validate the quantity, weight, and price. Each must be
present and numeric. For any bad data, display a message box. Calculate the charge
for the current item and add the charge and weight into the appropriate totals. Do not
calculate shipping and handling on individual items; rather, calculate shipping and
handling on the entire order.

When the Update Summary button is clicked, calculate shipping and handling, the general sales tax (GST), and the total amount due for the order. The GST is 7 percent
of the total charge and is charged only for shipments to a Singapore address.
The shipping and handling charges depend on the weight of the products. Calculate
the shipping charge as 25 cents per pound and add that amount to the handling charge
(taken from Table 1).

Display the entire amount of the bill in labels titled Dollar amount due, GST, Shipping
and handling, and Total amount due.

Table 1
Weight
Handing
Less than 10 pounds
$1
10 to 100 pounds $3.00
$3
Over100 pounds $5.00
$5


Notes:
Please include some comments in your program. As minimum comments, we would
like to see your name, assignment number, and program purpose at the top of the
main file. In addition, each procedure should have a short comment indicating its
purpose. You can place comments anywhere in your program by first typing the '
character. Everything on that line that follows this character is considered a comment
and is ignored by the compiler.

Option Explicit
'Deimension module-leavel variables
Dim mintQuantitySum As Integer
Dim mcurAmountDueSum As Currency
Dim mcurPriceSum As Currency
Dim mcurSaleTaxSum As Currency
Dim mcurTotalAmountDueSum As Currency
Dim mcurShipping As Currency
Dim mintSaleCount As Integer
Dim mintWeight As Integer

Private Sub CmdUpdate_Click()

'Calculate and display the current amounts, add to totals
Dim intQuantity As Integer
Dim curPrice As Currency
Dim curAmountDueSum As Currency
Dim curTotalAmountDueSum As Currency
Const curShipping As Currency = 0.25
Const curGSTRate As Currency = 0.07

'Convertinput values to numeric variable
If IsNumeric(txtWeight.Text) Then
intWeight = Val(txtWeight.Text)
End If

'Find the price
If txtWeight.DataField < 10 = True Then
curPrice = 1#
ElseIf txtWeight.Text >= 10 = 100 = True Then
curPrice = 3#
ElseIf txtWeight.Text < 100 = True Then
curPrice = 5#
End If

'Add the price time quantity to running total

'Format and display answers for sale
lblPrice.Caption = FormatCurrency(curPrice)

'Format and dispaly summary values
lblAmountDueSum.Caption = FormatCurrency(mcurAmountDueSum)
lblSalestaxSum.Caption = FormatCurrency(mcurSalestaxSum)
lblShippingSum.Caption = FormatCurrency(mcurShippingSum)
lblTotalAmountDueSum.Caption = FormatCurrency(mcurTotalAmountDueSum)
End Sub

Private Sub CmdExit_Click()
'Exit from the project
End
End Sub

Private Sub CmdPrint_Click()
'Print the form
PrintForm

End Sub