So far I'am using this code.
The problem is it loads too slow when it is loading on my textbox, is there another way around it? I was just looking for suggestions or ideas. Thank you.
Function qtyCheck()
query = "SELECT SUM(prdInput) AS prdInput FROM ProdOutput WHERE HELPER ='" & txtLot.Text & "-" & txtPartNumber.Text & "-" & txtProcess1.Text & "';"
retrieveSingleResult(query)
proc1QTYIn.Text = dt.Rows(0)("prdInput").ToString()
query = "SELECT SUM(prdOutput) AS prdOutput FROM ProdOutput WHERE HELPER ='" & txtLot.Text & "-" & txtPartNumber.Text & "-" & txtProcess1.Text & "';"
retrieveSingleResult(query)
proc1QTYOut.Text = dt.Rows(0)("prdOutput").ToString()
'/
query = "SELECT SUM(prdInput) AS prdInput FROM ProdOutput WHERE HELPER ='" & txtLot.Text & "-" & txtPartNumber.Text & "-" & txtProcess2.Text & "';"
retrieveSingleResult(query)
proc2QTYIn.Text = dt.Rows(0)("prdInput").ToString()
query = "SELECT SUM(prdOutput) AS prdOutput FROM ProdOutput WHERE HELPER ='" & txtLot.Text & "-" & txtPartNumber.Text & "-" & txtProcess2.Text & "';"
retrieveSingleResult(query)
proc2QTYOut.Text = dt.Rows(0)("prdOutput").ToString()
'/
query = "SELECT SUM(prdInput) AS prdInput FROM ProdOutput WHERE HELPER ='" & txtLot.Text & "-" & txtPartNumber.Text & "-" & txtProcess3.Text & "';"
retrieveSingleResult(query)
proc3QTYIn.Text = dt.Rows(0)("prdInput").ToString()
query = "SELECT SUM(prdOutput) AS prdOutput FROM ProdOutput WHERE HELPER ='" & txtLot.Text & "-" & txtPartNumber.Text & "-" & txtProcess3.Text & "';"
retrieveSingleResult(query)
proc3QTYOut.Text = dt.Rows(0)("prdOutput").ToString()
'/
query = "SELECT SUM(prdInput) AS prdInput FROM ProdOutput WHERE HELPER ='" & txtLot.Text & "-" & txtPartNumber.Text & "-" & txtProcess4.Text & "';"
retrieveSingleResult(query)
proc4QTYIn.Text = dt.Rows(0)("prdInput").ToString()
query = "SELECT SUM(prdOutput) AS prdOutput FROM ProdOutput WHERE HELPER ='" & txtLot.Text & "-" & txtPartNumber.Text & "-" & txtProcess4.Text & "';"
retrieveSingleResult(query)
proc4QTYOut.Text = dt.Rows(0)("prdOutput").ToString()
'/
query = "SELECT SUM(prdInput) AS prdInput FROM ProdOutput WHERE HELPER ='" & txtLot.Text & "-" & txtPartNumber.Text & "-" & txtProcess5.Text & "';"
retrieveSingleResult(query)
proc5QTYIn.Text = dt.Rows(0)("prdInput").ToString()
query = "SELECT SUM(prdOutput) AS prdOutput FROM ProdOutput WHERE HELPER ='" & txtLot.Text & "-" & txtPartNumber.Text & "-" & txtProcess5.Text & "';"
retrieveSingleResult(query)
proc5QTYOut.Text = dt.Rows(0)("prdOutput").ToString()
'/
query = "SELECT SUM(prdInput) AS prdInput FROM ProdOutput WHERE HELPER ='" & txtLot.Text & "-" & txtPartNumber.Text & "-" & txtProcess6.Text & "';"
retrieveSingleResult(query)
proc6QTYIn.Text = dt.Rows(0)("prdInput").ToString()
query = "SELECT SUM(prdOutput) AS prdOutput FROM ProdOutput WHERE HELPER ='" & txtLot.Text & "-" & txtPartNumber.Text & "-" & txtProcess6.Text & "';"
retrieveSingleResult(query)
proc6QTYOut.Text = dt.Rows(0)("prdOutput").ToString()
'/
query = "SELECT SUM(prdInput) AS prdInput FROM ProdOutput WHERE HELPER ='" & txtLot.Text & "-" & txtPartNumber.Text & "-" & txtProcess7.Text & "';"
retrieveSingleResult(query)
proc7QTYIn.Text = dt.Rows(0)("prdInput").ToString()
query = "SELECT SUM(prdOutput) AS prdOutput FROM ProdOutput WHERE HELPER ='" & txtLot.Text & "-" & txtPartNumber.Text & "-" & txtProcess7.Text & "';"
retrieveSingleResult(query)
proc7QTYOut.Text = dt.Rows(0)("prdOutput").ToString()
'/
query = "SELECT SUM(prdInput) AS prdInput FROM ProdOutput WHERE HELPER ='" & txtLot.Text & "-" & txtPartNumber.Text & "-" & txtProcess8.Text & "';"
retrieveSingleResult(query)
proc8QTYIn.Text = dt.Rows(0)("prdInput").ToString()
query = "SELECT SUM(prdOutput) AS prdOutput FROM ProdOutput WHERE HELPER ='" & txtLot.Text & "-" & txtPartNumber.Text & "-" & txtProcess8.Text & "';"
retrieveSingleResult(query)
proc8QTYOut.Text = dt.Rows(0)("prdOutput").ToString()
End Function