Saturday, July 6, 2013

Contoh kode ini adalah kode yang diterapkan pada aplikasi komplit atau lengkap, misal


Private Sub Command1_Click()
With Adodc1.Recordset
.AddNew
!NIK = Text12.Text
!NAMA = Text13.Text
!TEMPAT_LHR = Text14.Text
!TGL_LHR = Text15.Text
!RT = Text5.Text
!RW = Text6.Text
!KEC = Text8.Text
!KELURAHAN = Text7.Text
!AGAMA = Combo1.Text
!PEKERJAAN = Text9.Text
!WARGA = Text10.Text
!BERLAKU = Text11.Text
!GOL = Combo2.Text
!Loc = Text16.Text
!PIC = Image1
Kode tambahan di posisi ini 
End With
End Sub 
 
Maksudnya adalah  :  Dengan melalui Adodc1 tempat penyimpanannya Tambahkan baru
!NIK (nama kolom pada database), diisi oleh text12. jenis nya text begitu seterusnya.


 Untuk Mengosongkan  text 12 dan seterusnya setelah penyimpanan anda bisa menyimpan kode berikut pada kode tambahan.

Text12.Text = ""
Text13.Text = ""
Text14.Text = ""
Text15.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Text16.Text = ""
Option3.Refresh
Option4.Refresh
Check4.Refresh
Check5.Refresh




1 comment: