Hello everyone..
I m having a problem over here and dont knw wht else i have to do...
i have 2 listviews (LvBill and LvBillPo) the data from LvBill wil go to the LvBillPo and if its fine then it wil get saved by pressing on the save button and data wil get updated in a table called txpaypo.. bt when i m pressing on save button is giving me thie error "Multiple-Step operation generated errors. check each status value."
i have checked everything bt still is not working.. can u help me plz... i wil send u the code.. i m getting error on the line which is bold
thank u very much in advance
If LvBillPo.ListIt ems.Count <> 0 Then
Dim rsTxBills As New ADODB.Recordset
Dim j As Integer
'save data
If rsTxBills.State = adStateOpen Then rsTxBills.Close
rsTxBills.Open ("TxPayPo"), Db, adOpenKeyset, adLockPessimist ic
For j = 1 To LvBillPo.ListIt ems.Count
With rsTxBills
rsTxBills.AddNe w
.Fields("YY") = LvBillPo.ListIt ems(j).SubItems (1)
.Fields("PaySrl ") = LvBillPo.ListIt ems(j).SubItems (2)
.Fields("PoYY") = LvBillPo.ListIt ems(j).SubItems (1)
.Fields("PoNo") = LvBillPo.ListIt ems(j).Text
.Fields("AmendN o") = LvBillPo.ListIt ems(j).SubItems (3)
.Fields("UnitId ") = LvBillPo.ListIt ems(j).SubItems (5)
If IsNull(LvBillPo .ListItems(j).S ubItems(6)) = False Then .Fields("AdjAmt ") = LvBillPo.ListIt ems(j).SubItems (6)
If IsNull(LvBillPo .ListItems(j).S ubItems(7)) = False Then .Fields("TDSAmt ") = LvBillPo.ListIt ems(j).SubItems (7)
.Fields("BillSr l") = LvBillPo.ListIt ems(j).SubItems (8)
'.Fields("BillN o") = LvBillPo.ListIt ems(j).SubItems (9)
'.Fields("BillY Y") = LvBillPo.ListIt ems(j).SubItems (10)
.Fields("EntryD ate") = Format(Date, "DD-MMM-YYYY")
.Fields("EntryU ser") = Trim(pStrLoginN m)
.Fields("EntryT ime") = Format(Time, "HH:MM")
.Update
End With
Next j
rsTxBills.Close
End If
I m having a problem over here and dont knw wht else i have to do...
i have 2 listviews (LvBill and LvBillPo) the data from LvBill wil go to the LvBillPo and if its fine then it wil get saved by pressing on the save button and data wil get updated in a table called txpaypo.. bt when i m pressing on save button is giving me thie error "Multiple-Step operation generated errors. check each status value."
i have checked everything bt still is not working.. can u help me plz... i wil send u the code.. i m getting error on the line which is bold
thank u very much in advance
If LvBillPo.ListIt ems.Count <> 0 Then
Dim rsTxBills As New ADODB.Recordset
Dim j As Integer
'save data
If rsTxBills.State = adStateOpen Then rsTxBills.Close
rsTxBills.Open ("TxPayPo"), Db, adOpenKeyset, adLockPessimist ic
For j = 1 To LvBillPo.ListIt ems.Count
With rsTxBills
rsTxBills.AddNe w
.Fields("YY") = LvBillPo.ListIt ems(j).SubItems (1)
.Fields("PaySrl ") = LvBillPo.ListIt ems(j).SubItems (2)
.Fields("PoYY") = LvBillPo.ListIt ems(j).SubItems (1)
.Fields("PoNo") = LvBillPo.ListIt ems(j).Text
.Fields("AmendN o") = LvBillPo.ListIt ems(j).SubItems (3)
.Fields("UnitId ") = LvBillPo.ListIt ems(j).SubItems (5)
If IsNull(LvBillPo .ListItems(j).S ubItems(6)) = False Then .Fields("AdjAmt ") = LvBillPo.ListIt ems(j).SubItems (6)
If IsNull(LvBillPo .ListItems(j).S ubItems(7)) = False Then .Fields("TDSAmt ") = LvBillPo.ListIt ems(j).SubItems (7)
.Fields("BillSr l") = LvBillPo.ListIt ems(j).SubItems (8)
'.Fields("BillN o") = LvBillPo.ListIt ems(j).SubItems (9)
'.Fields("BillY Y") = LvBillPo.ListIt ems(j).SubItems (10)
.Fields("EntryD ate") = Format(Date, "DD-MMM-YYYY")
.Fields("EntryU ser") = Trim(pStrLoginN m)
.Fields("EntryT ime") = Format(Time, "HH:MM")
.Update
End With
Next j
rsTxBills.Close
End If
Comment