D
Dan Sprouse
Guest
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim Diffproduct1 As Integer = 0
Dim boxcount1 As Integer = 0
Dim palletnumber1 As Integer = 0
Dim totalsum As Double = 0
Dim total As Decimal
ProgressBar1.Minimum = palletnumber1
ProgressBar2.Minimum = boxcount1
Randomize()
box1 = 1
pal1 = 1
diff1 = 1
For Diffproduct1 = 0 To Form2.ListView2.Items.Count - 2
For palletnumber1 = 1 To Form2.ListView2.Items(0).SubItems(3).Text()
Dim item6 As New ListViewItem(Form1.TextBox1.Text & Form2.ListView2.Items(0).SubItems(0).Text() & pal1.ToString("00000"))
ListView1.Items.Add(item6)
ListView2.Items.Clear()
For boxcount1 = 1 To Form2.ListView2.Items(0).SubItems(2).Text()
Dim item5 As New ListViewItem("Box#:" & Form1.TextBox1.Text & box1.ToString("00000"))
Dim rn As New Random
item5.SubItems.Add(Form2.ListView2.Items(0).SubItems(0).Text())
item5.SubItems.Add(rn.Next(Form2.ListView1.Items(0).SubItems(2).Text(), (Form2.ListView1.Items(0).SubItems(3).Text())) & "." & (Format(rn.Next(0, 99), "00")))
ListView2.Items.Add(item5)
total = total + ListView2.Items(0).SubItems(2).Text()
box1 = box1 + 1
TextBox1.Text = Format(total, "#,##0.00")
ProgressBar2.Maximum = box1
ProgressBar2.Value = box1
Next
total = 0
pal1 = pal1 + 1
ProgressBar1.Maximum = pal1
ProgressBar1.Value = pal1
Next
diff1 = diff1 + 1
Next
End Sub
ok the problem I am having is if you look at the production form bottom list view shows 2 different products , when you look at produce pallet form it only shows 1 product being produced. now I add the forms to show what I am working on to give some idea to what is going on and the code block that this sits in
Continue reading...