aslm pak
masih Tanya juga ni masih eroh juga imput tanggal sql pada vba nya mohon pencerahan dimana salahnya
Private Sub CmdSimpan_Click()
Call koneksi
Dim sql As String
sql = "insert into Sekolah (sek_NSS,Sek_UNIK,Sek_Tis_Kode,Sek_Nama,Sek_Status,Sek_NamaPimpinan," _
& " Sek_YysnNama,Sek_YysnAlamat,Sek_YysnKelompok,Sek_Akreditasi," _
& " Sek_Klp_ID,Sek_Alamat,Sek_Desa,Sek_Geo_ID,Sek_KodePOS,Sek_Kab_ID,Sek_Kec,Sek_NoTelp," _
& "Sek_Fax,Sek_email,Sek_website) values ('" & TextNPSN & "','" & TextNSS & _
"','" & cbmTingkat & _
"','" & TextSekolah & _
"','" & cmbStatus & _
"','" & TextPimpinan & _
"','" & TextNamaYayasan & _
"','" & TextAlamatYayasan & _
"','" & cmbKelompokYayasan & _
"','" & cmbAkreditasi & _
"','" & cmbKelompokSMK & _
"','" & TextAlamat & _
"','" & TextKelurahan & _
"','" & cmbLokasi & _
"','" & TextKodePos & _
"','" & cmbKabupaten & _
"','" & cmbKecamatan & _
"','" & TextTelepon & _
"','" & TextFax & _
"','" & TextEmail & _
"','" & TextWebsite & _
"','" & TglFalid & _
"','" & Format(Date, "yyyy/mm/dd") & "')"
Dim sql As String
sql = "insert into Sekolah (sek_NSS,Sek_UNIK,Sek_Tis_Kode,Sek_Nama,Sek_Status,Sek_NamaPimpinan," _
& " Sek_YysnNama,Sek_YysnAlamat,Sek_YysnKelompok,Sek_Akreditasi," _
& " Sek_Klp_ID,Sek_Alamat,Sek_Desa,Sek_Geo_ID,Sek_KodePOS,Sek_Kab_ID,Sek_Kec,Sek_NoTelp," _
& "Sek_Fax,Sek_email,Sek_website) values ('" & TextNPSN & "','" & TextNSS & _
"','" & cbmTingkat & _
"','" & TextSekolah & _
"','" & cmbStatus & _
"','" & TextPimpinan & _
"','" & TextNamaYayasan & _
"','" & TextAlamatYayasan & _
"','" & cmbKelompokYayasan & _
"','" & cmbAkreditasi & _
"','" & cmbKelompokSMK & _
"','" & TextAlamat & _
"','" & TextKelurahan & _
"','" & cmbLokasi & _
"','" & TextKodePos & _
"','" & cmbKabupaten & _
"','" & cmbKecamatan & _
"','" & TextTelepon & _
"','" & TextFax & _
"','" & TextEmail & _
"','" & TextWebsite & _
"','" & TglFalid & _
"','" & Format(Date, "yyyy/mm/dd") & "')"
'sql = "insert into sekolah(Sek_LastUpdate) values ('" & Format(Date, "yyyy/mm/dd") & "')"
conn.Execute sql
Call bersih
Call Blank
End Sub
conn.Execute sql
Call bersih
Call Blank
End Sub
From: hari yanto <har_i20002000@yahoo.com>
To: belajar-access@yahoogroups.com
Sent: Wednesday, May 22, 2013 2:12 AM
Subject: Re: Format Tgl Acces-MySql-MsQl / dh [belajar-access] Tombol Cari
To: belajar-access@yahoogroups.com
Sent: Wednesday, May 22, 2013 2:12 AM
Subject: Re: Format Tgl Acces-MySql-MsQl / dh [belajar-access] Tombol Cari
Wa'alaikum salam Wr Wb.. Kalau database pakai MySql, yang digunakan bukan yang untuk Ms Acces. Tapi yang MySql: Format(TGL, "YYYY-MM-DD") "','" & tglValid(Date, for_date) & "')" menjadi: "','" & Format(tglValid, "YYYY-MM-DD") & "')" Semoga bisa membantu dan memberi semangat. Hariyanto (Surabaya)
|
__._,_.___
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (16) |
SPAM IS PROHIBITED
.
__,_._,___
Tidak ada komentar:
Posting Komentar