Ceriwis  

Go Back   Ceriwis > HOBI > Komputer & Teknologi > Programming

Programming Share, tanya jawab, saling bantu antar programmer dengan berbagai macam bahasa pemrograman.

Reply
 
Thread Tools
  #1  
Old 11th November 2011
Braincode's Avatar
Braincode Braincode is offline
Ceriwis Addicted
 
Join Date: Nov 2011
Posts: 4,638
Rep Power: 20
Braincode mempunyai hidup yang Normal
Default <ask> VIsual Basic 6

Quote:






Originally Posted by bstarconspiracy



pagi all maaf neh ane lagi kesusahaan gan



lagi nyelesain tugas akhir



mohon bantuannya gan



ane punya tampilan form yang gini




Spoiler for input data barang:
















nah ane mentok pas di tombol carinya gan



ane pake adodc ke access gan




Code:

Private Sub Command5_Click()
Dim a, b As Integer
Adodc1.Recordset.MoveFirst
a = Adodc1.Recordset.RecordCount
b = 0
Do While Not Adodc1.Recordset.EOF
b = b + 1
If Combo1.Text = "Kode Barang" Then
MsgBox ("data di temukan")
If Adodc1.Recordset!Kode_Barang = Text6.Text Then
Text1.Text = Adodc1.Recordset!Kode_Barang
Text2.Text = Adodc1.Recordset!Nama_Barang
Text3.Text = Adodc1.Recordset!Jenis_Barang
Text4.Text = Adodc1.Recordset!Satuan
Text5.Text = Adodc1.Recordset!Harga
Exit Do
ElseIf a = b Then
MsgBox ("data tidak ditemukan")
Exit Do
End If
ElseIf Combo1.Text = "Nama Barang" Then
If UCase(Adodc1.Recordset!Nama_Barang) = UCase(Text6.Text) Then
Text1.Text = Adodc1.Recordset!Kode_Barang
Text2.Text = Adodc1.Recordset!Nama_Barang
Text3.Text = Adodc1.Recordset!Jenis_Barang
Text4.Text = Adodc1.Recordset!Satuan
Text5.Text = Adodc1.Recordset!Harga
Exit Do
ElseIf a = b Then
MsgBox ("data tidak ditemukan")
Exit Do
End If
ElseIf Combo1.Text = "" Or Text6.Text = "" Then
MsgBox ("anda belum memasukan pilihan pencarian")
Exit Do
End If
Adodc1.Recordset.MoveNext
Loop
End Sub
Private Sub Command6_Click()
End
End Sub

ohh yahh kalo da yang kurang n salah mohon koreksinya gan makasih











Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


 


All times are GMT +7. The time now is 01:04 PM.


no new posts