Skip to main content

AccessTr.neT


VB.NET ile Mükerrer Kayıt Uyarısı Nasıl Verilir ?

VB.NET ile Mükerrer Kayıt Uyarısı Nasıl Verilir ?

#6
Bu yapıda ki kodlamaya mükerrer kayıt uyarısı verdirip  kaydetmemeyi nasıl yaptırabiliriz.Teşekkürler


Dim SonSatır As Variant

Private Sub CommandButton1_Click()
If TextBox1 <> "" And TextBox2 <> "" And TextBox3 <> "" Then

If IsNumeric(TextBox3.Value) Then

SonSatır = WorksheetFunction.CountA(Worksheets("personel").Range("A:A")) + 1

    If SonSatır = 2 Then
        Worksheets("PERSONEL").Cells(SonSatır, 1) = 1
        Worksheets("PERSONEL").Cells(SonSatır, 2) = TextBox1.Value
        Worksheets("PERSONEL").Cells(SonSatır, 3) = TextBox2.Value
        Worksheets("PERSONEL").Cells(SonSatır, 4) = TextBox3.Value
        TextBox1 = ""
        TextBox2 = ""
        TextBox3 = ""
    Else
        Worksheets("PERSONEL").Cells(SonSatır, 1) = Worksheets("personel").Cells(SonSatır - 1, 1) + 1
        Worksheets("PERSONEL").Cells(SonSatır, 2) = TextBox1.Value
        Worksheets("PERSONEL").Cells(SonSatır, 3) = TextBox2.Value
        Worksheets("PERSONEL").Cells(SonSatır, 4) = TextBox3.Value
        TextBox1 = ""
        TextBox2 = ""
        TextBox3 = ""
        MsgBox "KAYIT YAPILDI", vbOKOnly + vbInformation, "Veri Kaydedildi"
    End If
Else
MsgBox "SİCİLNO YA RAKAM GİRİNİZ"
GoTo SoN
End If
Else
MsgBox " İLGİLİ ALANLARI DOLDURUNUZ"
SoN:
End If
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
RE: VB.NET ile Mükerrer Kayıt Uyarısı Nasıl Verilir ? - Yazar: kuzens - 29/06/2020, 12:57
Task