I am using the code below to update the fields in a table.bt it update only first recorde ..where m i doin wrong plzz. help me..!
StChk.Open "SELECT * From SPINF WHERE STATUS='Active'", Con, adOpenDynamic, adLockOptimistic
FeeTrans.Open "select * from TBLFEE ORDER BY VOUCHERNO", Con, adOpenDynamic, adLockOptimistic
Do While Not StChk.EOF
FeeTrans.MoveFirst
'StChk.MoveFirst
If FeeTrans.Fields(2) = StChk.Fields(0) And FeeTrans.Fields(3) = StChk.Fields(45) Then
StChk.Fields(39) = FeeTrans.Fields(26)
FeeTrans.Fields(26) = 0
FeeTrans.Fields(23) = True
MsgBox ("Rc updated")
FeeTrans.Update
StChk.Update
End If
StChk.MoveNext
FeeTrans.MoveNext
Loop
MsgBox ("All Records Has Transfered & Saved in new Receipts")
StChk.Close
FeeTrans.Close