Ceriwis

Ceriwis (https://forum.ceriwis.com/forum.php)
-   Programming (https://forum.ceriwis.com/forumdisplay.php?f=63)
-   -   <ask> VIsual Basic 6 (https://forum.ceriwis.com/showthread.php?t=538899)

Braincode 11th November 2011 02:14 PM

<ask> VIsual Basic 6
 

Quote:






Originally Posted by bstarconspiracy
http://static.kaskus.us/images/buttons/viewpost.gif


pagi all maaf neh ane lagi kesusahaan gan :kabur:



lagi nyelesain tugas akhir :hammer:



mohon bantuannya gan :handshake:



ane punya tampilan form yang gini




Spoiler for input data barang:






http://u.kaskus.us/4/hdki5sds.jpeg









nah ane mentok pas di tombol carinya gan



ane pake adodc ke access gan :ganteng:




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 :shakehand:









</div>


All times are GMT +7. The time now is 08:58 AM.