Me.Metin481 = Year(Date)
modül kodunu aşağıdaki gibi düzenleyip dener misiniz?
Function Yok() As Long
Dim Kayit As Recordset, Sayac As Long
Set Kayit = CurrentDb.OpenRecordset("Select Rapor_No_Dosya from Tablo1 where (Rapor_No_Dosya)>0 and [Rapor_Yili]=" & Year(Date) & " order by Rapor_No_Dosya") '<== değişen
If Kayit.RecordCount = 0 Then Yok = 1: Exit Function
Kayit.MoveFirst
Sayac = 0
Do Until Kayit.EOF
Sayac = Sayac + 1
If Sayac <> Nz(Kayit(0), 0) Then Yok = Sayac: Exit Do
Kayit.MoveNext
Loop
If Yok = 0 Then Yok = Kayit.RecordCount + 1 '<==eklenen
Kayit.Close: Set Kayit = Nothing
End Function