Private Sub Komut10_Click()
On Error GoTo Hata
Dim Str As String
Str = oturum.Value
If Me.dogrusifre = Me.Sifre Then
YetkiNe = Me.dogruyetki
KullaniciKim = Me.oturum
AktifKullaniciYetkisi
AktifKullanici
DoCmd.SetWarnings False
CurrentDb.Execute "INSERT INTO tbl_Kullanici_Kayit ( [user] ) SELECT aktifkullanici()"
DoCmd.SetWarnings True
If Me.aktiflik = 0 Then
MsgBox "Kullanıcı yetkileriniz İptal Edilmiştir. Lütfen sistem yöneticinizle görüşünüz..", vbCritical, "Kargo 2011"
Quit
Else
DoCmd.OpenForm "FFatura", , , , , , "Value=" + Str
Forms!FFatura.SetFocus
Forms!FFatura.Form!düzenleyenIsmi.Value = Me.Kullanici
DoCmd.Close acForm, "Frm_Kullanici_Giris"
End If
Else
YanlisSifre = YanlisSifre + 1
MsgBox YanlisSifre & ". Denemenizde şifrenizi yanlış girdiniz. Lütfen tekrar deneyiniz.. " & Chr(13) & "4. Hatanızda Program Kapanacaktır.", vbOKOnly + vbCritical, "Hatalı Şifre "
If YanlisSifre = 4 Then DoCmd.Quit (acQuitSaveNone)
End If
Exit Sub
Hata:
End Sub
Denedim, normal çalışıyor.