Bro Erwin no prolem koq, kan masih banyak jalan menuju roma hehehe.
cara saya ini kalo tidak mau disimpan yg dihapus record yg bersangkutan
bukan yg terakhir, krn di form saya ada 1 nomor txn yg uniq sbg PK jadi
delete pake where condition
saya dulu pernah coba pake isempty() tapi ada celah dimana ya lupa euy
makanya pake cara sekarang lebih safe tapi muter2, kan jalan keroma
pemandangannya bagus jadi muter dulu hahahaha.
Kalo ada cara yg lebih bagus, saya mah dengan senang hati menerima
koreksinya.
Oh iya di setiap form saya ini ada subform jadi begitu pindah cursor ke
subform langsung otomatis ke save deh, jadi saya pake cara spt itu.
Erwin Sugiawan wrote:
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.
------------------------------------------------------------------------
Don't let your dream ride pass you by. Make it a reality
<http://us.rd.yahoo.com/evt=51200/*http://autos.yahoo.com/index.html;_ylc=X3oDMTFibjNlcHF0BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDYXV0b3MtZHJlYW1jYXI->
with Yahoo! Autos.
---------------------------------------------------------------------------
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.