coba

"Data Source=C:\Program Files\joenware\Pengloahan KTP\data\dbKTP.mdb"

diganti 

"Data Source=dbKTP.mdb"

dan pindahkan databasenya ke dalam folder dimana file exe-nya berada.. 
hal ini kemungkinan dikarenakan tidak tepatnya path "dbKTP.mdb"

tq






larry marzan <[email protected]> 
Sent by: [email protected]
16/02/2010 10:32
Please respond to
[email protected]


To
Programmer VB <[email protected]>
cc

Subject
[Programmer-VB] cara save / add record command button via textbox






 

Dear all,
saya ingin tau caranya save record command button yang recordnya berasal 
dari textbox.
saya menggunakan database mdb.
berikut coding saya.

Private Sub cmd_save_Click()
!nama = txt_nama.Text
!tempat = txt_tempat.Text
!tglahir = txt_tglahir.Text
!kelamin = txt_kelamin.Text
!alamat = txt_alamat.Text
!rtrw = txt_rtrw.Text
!desa = txt_kel.Text
!kecamatan = txt_kec.Text
!agama = txt_agama.Text
!Status = txt_nikah.Text
!kerja = txt_job.Text
!berlaku = txt_expire.Text
!warga = txt_warga.Text

End Sub

Private Sub Form_Load()

Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=C:\Program Files\joenware\Pengloahan KTP\data\dbKTP.mdb"
Adodc1.RecordSource = "SELECT * FROM T_PENDUDUK"
Adodc1.Refresh

End Sub

nah waktu dijalankan dan mengklik command button "cmd_save" yang terjadi 
muncul compile error: "invalid or unqualified reference"

apakah ada yang kurang dari coding ini..?
mohon pencerahan... Thank's.





This message and any attachment are confidential and may be privileged or 
otherwise protected from disclosure. If you are not the intended recipient, you 
must not copy this message or attachment or disclose the contents to any other 
person. If you have received this transmission in error, please notify the 
sender immediately and delete the message and any attachment from your system. 
Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not accept 
liability for any omissions or errors in this message which may arise as a 
result of E-Mail-transmission or for damages resulting from any unauthorized 
changes of the content of this message and any attachment thereto. Merck KGaA, 
Darmstadt, Germany and any of its subsidiaries do not guarantee that this 
message is free of viruses and does not accept liability for any damages caused 
by any virus transmitted therewith.

Click http://disclaimer.merck.de to access the German, French, Spanish and 
Portuguese versions of this disclaimer.

<<image/gif>>

Kirim email ke