HARUSNYA SKRIP DIBAWAH INI DAH BISA Private Sub cmd_simpan_Click()
DoCmd.RunCommand acCmdRefreshPage If Me!CheckBox1 = 0 OR Me!CheckBox2 = 0 OR Me!CheckBox3 = 0 OR Me!CheckBox4 = 0 OR Me!CheckBox5 = 0 OR Me!CheckBox6 = 0 OR Me!CheckBox7 = 0 Then MsgBox "Data Pendukung Anda Belum Lengkap" ELSE DoCmd.RunCommand acCmdSaveRecord End If End Sub 2010/2/25 Andi Junianto <[email protected]> > > > Saya sudah mencobanya tetapi tidak bisa pak. gimana dong caranya > saya ga centang salah satu tetapi tetep bisa menyimpan datanya > yang saya mau bila salah satu g dicentang maka data tidak tersimpan dan > keluar warning tersebut > > ------------------------------ > *From:* Muntahar <[email protected]> > > *To:* [email protected] > *Sent:* Wednesday, February 17, 2010 14:23:49 > > *Subject:* Re: [belajar-access] Waning pada check box > > > > If Me!CheckBox1 = 0 And Me!CheckBox2 = 0 And Me!CheckBox3 = 0 And > Me!CheckBox4 = 0 And Me!CheckBox5 = 0 And Me!CheckBox6 = 0 And Me!CheckBox7 > = 0 Then > MsgBox "Data Pendukung Anda Belum Lengkap" > > > diganti > If Me!CheckBox1 = 0 OR Me!CheckBox2 = 0 OR Me!CheckBox3 = 0 OR Me!CheckBox4 > = 0 OR Me!CheckBox5 = 0 OR Me!CheckBox6 = 0 OR Me!CheckBox7 = 0 Then > MsgBox "Data Pendukung Anda Belum Lengkap" > > 2010/2/16 Andi Junianto <jona_c...@yahoo. com <[email protected]>> > >> >> [Attachment(s) <#12702fb90fd0123b_126d6b79a8a7a33e_TopText> from Andi >> Junianto included below] >> >> Berikut saya sertakan semua prosedure yang saya buat pda form sya >> Dan juga saya sertakan gambar form di attachment >> >> >> >> Option Compare Database >> Private Sub List70_AfterUpdate( ) >> ' Find the record that matches the control. >> Dim rs As Object >> >> Set rs = Me.Recordset. Clone >> rs.FindFirst "[ID_PELANGGAN] = '" & Me![List70] & "'" >> If Not rs.EOF Then Me.Bookmark = rs.Bookmark >> End Sub >> >> >> Private Sub cmd_tambah_Click( ) >> On Error GoTo Err_cmd_tambah_ Click >> DoCmd.GoToRecord , , acNewRec >> >> Exit_cmd_tambah_ Click: >> Exit Sub >> >> Err_cmd_tambah_ Click: >> MsgBox Err.Description >> Resume Exit_cmd_tambah_ Click >> >> End Sub >> Private Sub cmd_simpan_Click( ) >> DoCmd.RunCommand acCmdRefreshPage >> If Me!CheckBox1 = 0 And Me!CheckBox2 = 0 And Me!CheckBox3 = 0 And >> Me!CheckBox4 = 0 And Me!CheckBox5 = 0 And Me!CheckBox6 = 0 And Me!CheckBox7 >> = 0 Then >> MsgBox "Data Pendukung Anda Belum Lengkap" >> Exit Sub >> End If >> >> On Error GoTo Err_cmd_simpan_ Click >> >> >> DoCmd.RunCommand acCmdSaveRecord >> >> Exit_cmd_simpan_ Click: >> Exit Sub >> >> Err_cmd_simpan_ Click: >> MsgBox Err.Description >> Resume Exit_cmd_simpan_ Click >> >> End Sub >> Private Sub Combo79_AfterUpdate () >> ' Find the record that matches the control. >> Dim rs As Object >> >> Set rs = Me.Recordset. Clone >> rs.FindFirst "[ID_PELANGGAN] = '" & Me![Combo79] & "'" >> If Not rs.EOF Then Me.Bookmark = rs.Bookmark >> End Sub >> >> Private Sub Combo81_AfterUpdate () >> ' Find the record that matches the control. >> Dim rs As Object >> >> Set rs = Me.Recordset. Clone >> rs.FindFirst "[ID_PELANGGAN] = '" & Me![Combo81] & "'" >> If Not rs.EOF Then Me.Bookmark = rs.Bookmark >> End Sub >> Private Sub cmd_hapus_Click( ) >> On Error GoTo Err_cmd_hapus_ Click >> >> >> DoCmd.RunCommand acCmdSelectRecord >> DoCmd.RunCommand acCmdDeleteRecord >> >> Exit_cmd_hapus_ Click: >> Exit Sub >> >> Err_cmd_hapus_ Click: >> >> Resume Exit_cmd_hapus_ Click >> >> End Sub >> Private Sub cmd_keluar_Click( ) >> On Error GoTo Err_cmd_keluar_ Click >> >> >> If Me.Dirty Then Me.Dirty = False >> DoCmd.Close >> >> Exit_cmd_keluar_ Click: >> Exit Sub >> >> Err_cmd_keluar_ Click: >> MsgBox Err.Description >> Resume Exit_cmd_keluar_ Click >> >> End Sub >> >> Private Sub DAYA_Enter() >> Me.DAYA.Dropdown >> End Sub >> >> >> Private Sub LEMARI_Enter( ) >> Me.LEMARI.Dropdown >> End Sub >> >> >> Private Sub RAK_Enter() >> Me.RAK.Dropdown >> End Sub >> >> Private Sub RUANG_Enter( ) >> Me.RUANG.Dropdown >> End Sub >> >> Dalam form tersebut saya letakkan rumus yang anda berikan pada simpan, >> tetapi tetap tidak jalan >> yang sya inginkan bila saya tekan tombol simpan maka akan dicek terlebih >> dahulu dan apabila salah satu checkbox yang saya inginkan tidak tercentang >> akan keluar warning >> Nama Form : Arsip Induk Langganan >> Nama Checkbox : checkbox1 s/d checkbox7 >> >> >> >> >> ------------------------------ >> *From:* Belajar Office <belajaroffice@ gmail.com<[email protected]> >> > >> *To:* belajar-access@ yahoogroups. com <[email protected]> >> *Sent:* Tuesday, February 16, 2010 14:10:29 >> *Subject:* Re: [belajar-access] Waning pada check box >> >> >> >> >> Bpk, pastikan default value seluruh field check box adalah 0 (false). >> Sebenarnya saya ingin Bpk copy paste procedure yg sudah Bpk buat, karena >> saya jadinya hanya meraba2 dari sini, nama form, nama check box, desain >> table, dll mungkin baiknya di tuliskan. Bpk coba set perintah tsb pada suatu >> tombol di event on click, misal: >> >> Private Sub Command1_Click( ) >> DoCmd.RunCommand acCmdRefreshPage >> If Me!checkbox1 = 0 And Me!checkbox2 = 0 And Me!checkbox3 = 0 And >> Me!checkbox4 = 0 And Me!checkbox5 = 0 And Me!checkbox6 = 0 And Me!checkbox7 >> = 0 And Me!checkbox8 = 0 And Me!checkbox9 = 0 And Me!checkbox10 = 0 And >> Me!checkbox11 = 0 And Me!checkbox12 = 0 And Me!checkbox13 = 0 And >> Me!checkbox14 = 0 Then >> MsgBox "Data Anda Belum Lengkap" >> Exit Sub >> End If >> End Sub >> >> Thank's >> >> ----- Original Message ----- >> *From:* Andi Junianto <[email protected]> >> *To:* belajar-access@ yahoogroups. com <[email protected]> >> *Sent:* Tuesday, 16 February 2010 1:57 PM >> *Subject:* Re: [belajar-access] Waning pada check box >> >> >> >> Perintah tersebut diletakkan pada checkbok atau yang lain, karena udah sya >> cba taruh d form dan di masing2 check box g bisa juga >> mohon bantunnya >> >> >> ------------------------------ >> *From:* Belajar Office <belajaroffice@ gmail.com<[email protected]> >> > >> *To:* belajar-access@ yahoogroups. com <[email protected]> >> *Sent:* Tuesday, February 16, 2010 8:34:36 >> *Subject:* Re: [belajar-access] Waning pada check box >> >> >> >> Bpk, barangkali bisa tambahkan If dipadu dengan And, misal: >> >> if me!checkbox1=0 and me!checkbox2=0 and me!checkbox3=0 and me!checkbox4=0 >> and me!checkbox5=0 and me!checkbox6=0 and me!checkbox7=0 and me!checkbox8=0 >> and me!checkbox9=0 and me!checkbox10=0 and me!checkbox11=0 and >> me!checkbox12=0 >> and me!checkbox13=0 and me!checkbox14=0 then >> msgbox "Data Anda Belum Lengkap" >> exit sub >> end if >> >> Thank's >> >> ----- Original Message ----- >> *From:* Andi <[email protected]> >> *To:* belajar-access@ yahoogroups. com <[email protected]> >> *Sent:* Monday, 15 February 2010 12:46 PM >> *Subject:* [belajar-access] Waning pada check box >> >> >> >> Saya ingin tanya pada senior2 access nih >> saya membuat sebuah form yang isinya ada beberapa (14) pilihan centang >> (check box) yang datanya diambil dari data tabel berupa Yes/No. Saya >> menginginkan pada saat dijalankan bila tidak memilih salah satu item chekbox >> maka akan kelauar warning "Data Anda Belum Lengkap" >> Bagaimana caranya tolong bantuan secepatnya >> >> >> ------------------------------ >> Get your preferred Email name! >> <http://sg.rd.yahoo.com/aa/mail/domainchoice/mail/signature/*http://mail.promotions.yahoo.com/newdomains/aa/> >> Now you can @ymail.com and @rocketmail. com. >> >> >> ------------------------------ >> Get your new Email address! >> <http://sg.rd.yahoo.com/aa/mail/domainchoice/mail/signature/*http://mail.promotions.yahoo.com/newdomains/aa/> >> Grab the Email name you've always wanted before someone else does! >> > > > > -- > ------------ --------- --------- --------- ------ > grapyak-semanak- cluthak > http://djmumun. wordpress. com <http://djmumun.wordpress.com> > http://facebook. com/djmumun <http://facebook.com/djmumun> > ------------ --------- --------- --------- ------ > > ------------------------------ > New Email names for you! > <http://sg.rd.yahoo.com/aa/mail/domainchoice/mail/signature/*http://mail.promotions.yahoo.com/newdomains/aa/> > Get the Email name you've always wanted on the new @ymail and @rocketmail. > Hurry before someone else does! > > -- --------------------------------------------- grapyak-semanak-cluthak http://djmumun.wordpress.com http://facebook.com/djmumun ---------------------------------------------

