kalo boleh berdebat...... aku ngak setuju dgn teknik dari bro ivan, lebih baik
pake isempty selesai,
gunakan function isempty pada event before upadate
if not isempty()= true then
if msgbox("apakah data mau di simpan ",vbyesno) =vbno then
cancel =true
endif
endif
( note syntax mungkin salah krn langsung ketik di email :) )
kalo pake teknik bro ivan, kelemahan nya :
- data udah ke save duluan dan bila ngak ke pake baru di hapus.
- bila memasukan data nya lebih dari 1 krn source nya bounding , data yg
terakhir yg akan di hapus doang
kalo mau lebih susah.......... semua form unbound... jadi akan di simpan kalo
menekan tombol save. ( dalam tombol save di kasih function untuk add data ke
table )
bro ivan......... jgn marah ya kalo aku tak setuju dgn teknik nya
salam damai
Best regard
Erwin Sugiawan
----- Original Message ----
From: Ivan Leonardo <[EMAIL PROTECTED]>
To: [email protected]
Sent: Wednesday, September 19, 2007 8:59:36 AM
Subject: Re: [belajar-access] SAVE MELALUI COMMAND BUTTOM
Agak ribet emang di access utk antisipasi ini, kalo ga mau pake func
isempty( ) agak riskan.
1. buat flag textbox, kalo form terupdate/ada penginputan flag = 1, set
di form afterupdate properties
2. waktu user mau keluar dengan tekan tombol cmd close, kasih kondisi
if flag = 1 then msgbox sudah ada isi mau di save ? if yes move focus
to save cmd, if no delete current record
3. jangan lupa set control box = no, soalnya user juga sering klik
tanda X di kanan form
mungkin ada yg mau nambahin / koreksi
---------------------------------------------------------------------------
This message contains confidential information and is intended only for the
individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and delete
this e-mail from your system. E-mail transmission cannot be guaranteed to be
secure or error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the contents of this
message, which arise as a result of e-mail transmission. If verification is
required please request a hard-copy version.
____________________________________________________________________________________
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news,
photos & more.
http://mobile.yahoo.com/go?refer=1GNXIC