Skip to main content

AccessTr.neT


Genel bir soru

Genel bir soru

Çözüldü #7
Selamlar
örnek ekleyemiyorum. Modulü aşağıdaki şekilde yaparsınız istediğiniz sonucu alırsınız. Sadece 2. maddeyi size bırakmış oldum. Sorun olursa yazın yine

Option Compare Database
Private kayit As Boolean


Private Sub Adısoyadı_Exit(Cancel As Integer)
If IsNull(Me![Adısoyadı]) Then
If MsgBox("Adı Soyadı alanı boş... Boş geçilsinmi..? ", vbYesNo) = vbNo Then
Me.Adısoyadı.SetFocus
Else
Me.tcno.SetFocus

End If
End If
End Sub

Private Sub Form_BeforeUpdate(Cancel As Integer)
If kayit = False Then
Cancel = True
End If
End Sub

Private Sub tcno_Exit(Cancel As Integer)
If IsNull(Me![tcno]) Then
If MsgBox("TC Kimlik alanı boş... Boş geçilsinmi..? ", vbYesNo) = vbNo Then
Me.tcno.SetFocus
Else
Me.telefon.SetFocus
End If
End If
End Sub

Private Sub telefon_Exit(Cancel As Integer)
If IsNull(Me![telefon]) Then
If MsgBox("Telefon alanı boş... Boş geçilsinmi..? ", vbYesNo) = vbNo Then
Me.telefon.SetFocus
Else
Me.adres.SetFocus
End If
End If
End Sub



Private Sub Komut13_Click()
On Error GoTo Err_Komut13_Click


DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

Exit_Komut13_Click:
Exit Sub

Err_Komut13_Click:
MsgBox Err.Description
Resume Exit_Komut13_Click

End Sub
Private Sub Komut14_Click()
On Error GoTo Err_Komut14_Click


DoCmd.GoToRecord , , acNewRec

Exit_Komut14_Click:
Exit Sub

Err_Komut14_Click:
MsgBox Err.Description
Resume Exit_Komut14_Click

End Sub
Private Sub Komut15_Click()
On Error GoTo Err_Komut15_Click
If telefon & tcno & Adısoyadı <> "" Then
If IsNull(Adısoyadı) Or Adısoyadı = "" Then
GoTo eksikBilgi
End If
If IsNull(tcno) Or tcno = "" Then
GoTo eksikBilgi
End If
If IsNull(telefon) Or telefon = "" Then
GoTo eksikBilgi
End If

If MsgBox("Form kaydedilsin mi ... Hayırı seçerseniz verilerinizi kaybedeceksiniz ..? ", vbYesNo) = vbYes Then
kayit = True
DoCmd.Close
Else
kayit = False
DoCmd.Close
End If
Exit Sub
End If

kayit = False
DoCmd.Close

Exit_Komut15_Click:
Exit Sub

Err_Komut15_Click:
MsgBox Err.Description
Resume Exit_Komut15_Click
eksikBilgi:
If MsgBox("Eksik bilgi mevcut ... Kaydı iptal ederek çıkmak istiyormusunuz ..? ", vbYesNo) = vbYes Then
kayit = False
DoCmd.Close
End If

End Sub

Private Sub Komut16_Click()
On Error GoTo Err_Komut16_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

Exit_Komut16_Click:
Exit Sub

Err_Komut16_Click:
MsgBox Err.Description
Resume Exit_Komut16_Click

End Sub
Private Sub Komut17_Click()
On Error GoTo Err_Komut17_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70

Exit_Komut17_Click:
Exit Sub

Err_Komut17_Click:
MsgBox Err.Description
Resume Exit_Komut17_Click

End Sub
Hayatta listbox kullanmam..
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
Genel bir soru - Yazar: fascioğlu - 18/09/2013, 13:40
Cvp: Genel bir soru - Yazar: C*e*l*o*y*c*e - 18/09/2013, 17:22
Cvp: Genel bir soru - Yazar: fascioğlu - 18/09/2013, 19:41
Cvp: Genel bir soru - Yazar: fascioğlu - 18/09/2013, 20:39
Cvp: Genel bir soru - Yazar: fatih karagöl - 18/09/2013, 22:10
Cvp: Genel bir soru - Yazar: fascioğlu - 18/09/2013, 22:19
Cvp: Genel bir soru - Yazar: fatih karagöl - 18/09/2013, 22:56
Cvp: Genel bir soru - Yazar: fascioğlu - 19/09/2013, 00:23
Cvp: Genel bir soru - Yazar: fatih karagöl - 19/09/2013, 09:38
Cvp: Genel bir soru - Yazar: fascioğlu - 24/09/2013, 02:20