If TableExist("posebni_podaci_o_placama") Then GoTo zavrsi Else Exit Sub End If zavrsi: i = 901 Do While i < 916 Set rs2 = CurrentDb().OpenRecordset("select * from posebni_podaci_o_placama where id=" & i & ";") Set RS1 = CurrentDb().OpenRecordset("select * from [T sintetika] where firma=" & rs2!Firma & " and godina=" & rs2!godina & " and period='" & rs2!ObracinskiPeriod & "' and vr='PP' and aop=" & i & ";", dbOpenDynaset, dbSeeChanges) 'Netreba uslov ovde se samo upisuje i = i + 1 RS1.Edit RS1![Predhodna godina] = rs2!tekuca_godina RS1.Update Loop End Sub