Dear All,
I'd like to ask about my VB program. Coz, it shows an error while I run it.
Here is my code :
At the first looping, it shows no error. But at the second looping, comes an error atCode:If myPl.RecordCount > 0 Then myPl.MoveFirst Do While Not myPl.EOF For sizeLoop = 1 To (jmlSize - 1) Cnt = Cnt + 5 seqQ = PadToString(Cnt, 3) If optHeavy.Value = True Then tipeKain = "A" ElseIf Option1.Value = True Then tipeKain = "B" End If mSize = PadToString(sizeLoop, 2) rSize = "qty" & mSize OrdQty = myPl(rSize) myConn.BeginTrans myConn.Execute "insert into qcticket_hdr(pl_no, pack, fac_no, tgl, seq, kain_type, color, order_qty) " _ & "select '" & Trim(txtCtrlJob.Text) & "','" & Trim(txtPack.Text) & "','" _ & Trim(txtFtyNo.Text) & "','" & txtTgl.Text & "','" & Trim(seqQ) & "', '" _ & tipeKain & "','" & IIf(Not IsNull(Trim(myPl!Color)), Trim(myPl!Color), Null) & "'," & OrdQty & "" myConn.CommitTrans Next sizeLoop myPl.MoveNext Loop End If
The error said "Catasthropic Failure"Code:OrdQty = myPl(rSize)
Does anybody know about this and how to handle this ???
Need Help ASAP
Cheers,
Wen Lie


Reply With Quote