Dim Baza As Database Dim Sl_Zavrsna As Recordset Dim R Dim ID As String Dim CKmat As Double Dim VTPZ As Double Dim VTI As Double Dim Cijena As Double Set Baza = CurrentDb() Set Sl_Zavrsna = Baza.OpenRecordset("tblCijenaKostanja", dbOpenDynaset) Set Baza = CurrentDb ID = Me.IDStroja CKmat = Me.MatIznos VTPZ = Me.TPZ VTI = Me.TI R = MsgBox("Upisat u vrijednost pozicije", vbYesNo + vbExclamation + vbApplicationModal + vbDefaultButton2) If vbOK Then With Sl_Zavrsna .AddNew ![ID] = ID ![Materijal] = CKmat ![TI] = VTI ![TPZ] = VTPZ .Update End With Kraj: Set Baza = Nothing End If