Function KoefObracuna(IntVlaga As Integer) As Single Dim KoefO As String If IntVlaga = 0 Then KoefObracuna = 0 Else Select Case Me.Sifra.Column(2) Case 1 KoefO = "KO_Jecam" Case 2 KoefO = "KO_Kukuruz" Case 3 KoefO = "KO_Psenica" Case 4 KoefO = "KO_soja" Case 5 KoefO = "KO_Suncokret" Case 6 KoefO = "KO_Repa" End Select KoefObracuna = DLookup(KoefO, "tblVlage", "Vlaga=" & IntVlaga) End If End Function