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 <[email protected]>
To: [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
>To: belajar-access@ yahoogroups. com
>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>
>To: belajar-access@ yahoogroups. com
>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
>>To: belajar-access@ yahoogroups.
>> com
>>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!
>Now you can @ymail.com and
> @rocketmail. com.
>
New Email names for you!
Get the Email name you've always wanted on the new @ymail and @rocketmail.
Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/aa/