title: Visual Basic: Making multiple forms for an order
body: <p>I've been working on this project for two weeks now and I'm drained from all the hiccups I've come across. Now I've hit a brick wall.</p>
  
  <p>I'm making a "simple" order form in Visual Basic 2010 that calculates the amount due for an order and then from the total determines what the shipping will be. I've been able to accomplish the following tasks:</p>
  
  <ol>
  <li>accept customer data (name, address, city, state abbreviation, zipcode)</li>
  <li>calculate total with shipping costs (accurately, for the most part)</li>
  <li>clear the order form and exit</li>
  </ol>
  
  <p>But the way I have it right now, a customer can only put in 1 order form. </p>
  
  <p><strong>Problem:</strong> I have to figure out a way to allow a customer to place an <strong>order form for multiple items.</strong> (I'll assume that a customer will not place an order for more than 20 items). So what would be the best way to go about saving the information for multiple items then calculating the cost at the end?</p>
  
  <p>If it's multiple form creation, how is that done? Is the keyword "Container" the way to go, and how? At the end of the day, I just don't know how to create this multiple item form (it's like a database in Visual Basic), so any method, at least pointing me in the right direction, would be helpful.</p>
  
  <p>(Tried to post an image of my work so far but I'm new here - can't post images yet. I've posted a bit of my code below - code works for 1 order)</p>
  
  <p>Snippet Code:</p>
  
  <pre><code>Private Sub total_mouseleave(ByVal sender As Object, ByVal e As EventArgs) Handles total.MouseLeave
  
    Dim gs_1 As Decimal = 4.95
    Dim gs_2 As Decimal = 6.95
    Dim gs_3 As Decimal = 8.95
    Dim gs_4 As Decimal = 10.95
    Dim gs_5 As Decimal = 12.95
    Dim ex_1 As Decimal = 14.95
    Dim ex_2 As Decimal = 16.95
    Dim ex_3 As Decimal = 18.95
    Dim ex_4 As Decimal = 20.95
    Dim ex_5 As Decimal = 22.95
    Dim totalcost As Decimal
  
    totalcost = Convert.ToDecimal(total.Text)
  
    If gs_radiobutton.Checked Then
      If (totalcost &lt; 1) Then
        total.Text = Val(0)
        shipping.Text = Val(0)
      ElseIf (1 &lt; totalcost AndAlso totalcost &lt; 15) Then
        total.Text = Val(totalcost + gs_1)
        shipping.Text = ground_1
      ElseIf (15 &lt; totalcost AndAlso totalcost &lt;= 49.99) Then
        total.Text = totalcost + gs_2
        shipping.Text = gs_2
      ElseIf (50 &lt; totalcost AndAlso totalcost &lt;= 99.99) Then
        total.Text = totalcost + g_3
        shipping.Text = gs_3
      ElseIf (100 &lt; totalcost AndAlso totalcost &lt;= 199.99) Then
        total.Text = totalcost + gs_4
        shipping.Text = gs_4
      Else
        total.Text = totalcost + gs_5
        shipping.Text = gs_5
      End If
    End If
  
    '// . . . . 
  
  End Sub
  </code></pre>