Private Sub Form_Current()
Dim a As String
Dim Kntrlkul As String
a = InputBox("lütfen kullanıcı kodunu giriniz")
Kntrlkul = Nz(DLookup("kullanici", "kullanicilar", "kullanici= '" & a & "'"))
If Kntrlkul <> "" Then
MsgBox "kullanıcı adı mevcut"
Me.kullanici = a
Else
DoCmd.RunSQL "INSERT INTO kullanicilar (kullanici) VALUES('" & a & "')"
End If
End Sub
form current olayının kodu