If IsNull(Me![a]) Or Me.a = "" Then
If Me.d = 1 Then
Dim z As Integer
z = DCount("*", "tbl_dvit1", _
"donem= '" & Me.c _
& "' and ahidifk= '" & Me.d & "' ")
If z > 0 Then
If MsgBox("Aynı Kayıttan Var Kaydı Getireyim mi?", vbQuestion + vbYesNo, "Gümüşhacıköy TSM") = vbYes Then
a = Dlookup ("[id]", "[tbl_dvit1]", "[donem]=" & Me.c)
b = Dlookup ("[tarih]", "[tbl_dvit1]", "[donem]=" & Me.c)
e = Dlookup ("[dvitgebe]", "[tbl_dvit1]", "[donem]=" & Me.c)
f = Dlookup ("[dvitanne]", "[tbl_dvit1]", "[donem]=" & Me.c)
g = Dlookup ("[dvitrecete]", "[tbl_dvit1]", "[donem]=" & Me.c)
h = Dlookup ("[dvitdevreden]", "[tbl_dvit1]", "[donem]=" & Me.c)
i = Dlookup ("[dvitgelen]", "[tbl_dvit1]", "[donem]=" & Me.c)
j = Dlookup ("[dvitdagitilan]", "[tbl_dvit1]", "[donem]=" & Me.c)
k = Dlookup ("[dvitkalan]", "[tbl_dvit1]", "[donem]=" & Me.c)
l = Dlookup ("[toplam]", "[tbl_dvit1]", "[donem]=" & Me.c)
Else
DoCmd.SetWarnings (False)
kisitemizlea
DoCmd.SetWarnings (True)
End If
Else
Call denetimler_aktif
btn_kaydet.Enabled = False
btn_duzelt.Enabled = False
If IsNull(Me![a]) Or Me.a = "" Or Me.a = 0 Then
t = Nz(DLast("[dvitkalan]", "tbl_dvit1"), 0)
Me.a = Nz(DMax("id", "tbl_dvit1"), 0) + 1
Me.b = Date
Me.h = t
End If
Me.b = Date
If Me.h > 0 Then
Me.h.Enabled = False
End If
End If
End If
a = Dlookup ("[id]", "[tbl_dvit1]", "[donem]=" & Me.c)
b = Dlookup ("[tarih]", "[tbl_dvit1]", "[donem]=" & Me.c)
e = Dlookup ("[dvitgebe]", "[tbl_dvit1]", "[donem]=" & Me.c)
f = Dlookup ("[dvitanne]", "[tbl_dvit1]", "[donem]=" & Me.c)
g = Dlookup ("[dvitrecete]", "[tbl_dvit1]", "[donem]=" & Me.c)
h = Dlookup ("[dvitdevreden]", "[tbl_dvit1]", "[donem]=" & Me.c)
i = Dlookup ("[dvitgelen]", "[tbl_dvit1]", "[donem]=" & Me.c)
j = Dlookup ("[dvitdagitilan]", "[tbl_dvit1]", "[donem]=" & Me.c)
k = Dlookup ("[dvitkalan]", "[tbl_dvit1]", "[donem]=" & Me.c)
l = Dlookup ("[toplam]", "[tbl_dvit1]", "[donem]=" & Me.c)
bu yerde hata mesajı alıyorum. nasıl yaparsam düzelir ben döneme göre getirmesini istiyorum.yardımcı olursanız sevinirim.