Bpk, agar lebih mudah, langkah pertama sebaiknya di compile/debug dahulu module ini, lalu VBA akan memperlihatkan satu demi satu lokasi errornya. Thank's.
________________________________ From: Maulana <[email protected]> To: [email protected] Sent: Mon, January 18, 2010 4:04:33 PM Subject: [belajar-access] Mohon dikoreksi dan bantuan codenya Dear Pakar, saya buat form untuk pencarian seperti ini, dan saya mau buat button untuk setiap item yang di klik lewat combo12 dapat menampilkan data seperti, button detail tetapi yag ini berupa report yg datanya meliputi dari tabel indent,issue, purchase, receipt saja bagaimana sqlnya, intinya setiap item barang akan menampilkan data dalam satu report semua informasi yang dibutuhkan o y cara kerja combo12 ini ketika kita klik item combo12 kemudian klik button detail akan terbuka form update barang. terimakasih salam, Maulana Private Sub Command19_Click( ) (BUTTON DETAIL) Forms!UPDATE_ BARANG.AllowEdit s = False DoCmd.OpenForm "UPDATE_BARANG" Forms!UPDATE_ BARANG!Store_ Kode = Store_Kode Forms!UPDATE_ BARANG!Command34 .SetFocus Forms!UPDATE_ BARANG.Command19 .Enabled = False Forms!UPDATE_ BARANG.Command35 .Enabled = False Forms!UPDATE_ BARANG.Command36 .Enabled = False Forms!UPDATE_ BARANG.Command37 .Enabled = False Forms!UPDATE_ BARANG.Command38 .Enabled = False End Sub Private Sub Form_Load() KODE_BARANG. SetFocus End Sub Private Sub Combo12_Click( ) Store_Kode = RTrim(Left(Combo12, 7)) End Sub Private Sub NAMA_BARANG_ KeyPress( KeyAscii As Integer) 'ubah karakter jadi huruf besar KeyAscii = Asc(UCase(Chr( KeyAscii) )) If KeyAscii = 13 Then NAMA_BARANG. SetFocus End Sub Private Sub NAMA_BARANG_ LostFocus( ) Dim vara As Variant Dim VARI As Variant Dim VARS As Variant Dim varc As Variant Dim VARDATE As Variant Dim VARB As Variant vara = Combo12.ListCount For j = 0 To vara - 1 Step 1 Combo12.RemoveItem 0 Next j varc = "" VARI = DLookup("COUNT( STORE_KODE) ", "TBARANG", "NAMA_BARANG LIKE '*" & Forms!CARI_BARANG! INDENT_NO & "*'") For j = 1 To VARI Step 1 VARS = DLookup("STORE_ KODE", "TBARANG", "NAMA_BARANG LIKE '*" & Forms!CARI_BARANG! INDENT_NO & "*' AND STORE_KODE NOT IN ('" & varc & "')") VARB = VARS varc = varc & "','" & VARS VARS = DLookup("NAMA_ BARANG", "TBARANG", "STORE_KODE= '" & VARS & "'") VARB = VARB & " " & VARS Combo12.AddItem VARB VARB = "" Next j End Sub Private Sub STORE_KODE_KeyPress (KeyAscii As Integer) 'ubah karakter jadi huruf besar KeyAscii = Asc(UCase(Chr( KeyAscii) )) If KeyAscii = 13 Then Store_Kode.SetFocus End Sub Private Sub Command22_Click( ) On Error GoTo Err_Command22_ Click DoCmd.Close Exit_Command22_ Click: Exit Sub Err_Command22_ Click: MsgBox Err.Description Resume Exit_Command22_ Click End Sub __.._,_.___ Reply to sender | Reply to group Messages in this topic (1) Recent Activity: * New Members 15 Visit Your Group Start a New Topic SPAM IS PROHIBITED MARKETPLACE Going Green: Your Yahoo! Groups resource for green living Switch to: Text-Only, Daily Digest • Unsubscribe • Terms of Use .

