Thanks for your answer for my earlier questing. It solved my problem
I am using VB6 as front end and Access as back end. I'm editing my table for particular field. I am editing rate of one item in RMmaster file. It's doing it, but I want to edit rate of same field which is in another file. I am getting above error. My code is as under:
:- If Rs1.State = adStateOpen Then Rs1.Close Rs1.Open "select * from bill_details where prod_sno=" & Val(LblSr.Caption), Cn, adOpenDynamic, adLockOptimistic If Rs1.RecordCount > 0 Then Dim OldRt As Integer Dim bILL As Integer Rs1.MoveFirst For i = 1 To Rs1.RecordCount OldRt = Rs1("amt") Rs1("rate") = Val(TxtRate.Text) Rs1("amt") = Rs1("rate") * Rs1("qty") / 100 Rs1.MoveNext If Rs2.State = adStateOpen Then Rs2.Close Rs2.Open "Select * from bill where invoice_no" = Rs1("Bill_Sno"), Cn, adOpenDynamic, adLockOptimistic >>>> on this line i am getting error >>>> Rs2("total_amt") = Rs2("total_amt") - OldRt + Rs1("amt") Next End
Please help if you can.
Regards and thanks in advance.
May 27, 2009 11:42 AM
April 19, 2013 8:08 PM