End If End With
End Sub Private Sub txtsearch1_Change
PopData txtsearch1.Text End Sub
4. Gerindo
Private Sub cmdDelete_Click Dim strDelete As String
strDelete = Delete from GerToIndo Where Id =
gintIdItem.Text gAdoConn.Execute strDelete
PopData strTextSearch txtWord.Text =
txtMeaning.Text = End Sub
Private Sub cmdNew_Click txtWord.Text =
txtMeaning.Text = End Sub
Private Sub cmdSave_Click
Universitas Sumatera Utara
Dim strSQL As String Dim rs As ADODB.Recordset
If txtWord.Text = Then MsgBox Enter the word. , vbExclamation, Alert
Exit Sub End If
If txtMeaning.Text = Then MsgBox Enter the meaning of word., vbExclamation,
Alert Exit Sub
End If strSQL = Insert into
GerToIndoIstilah,IstilahDescValues SQLSafetxtWord.Text , _
SQLSafetxtMeaning.Text gAdoConn.Execute strSQL
PopData strTextSearch txtWord.Text =
txtMeaning.Text = End Sub
Private Sub Form_Load InitConnection
Universitas Sumatera Utara
PopData strTextSearch End Sub
Private Sub lstView_ItemClickByVal Item As
MSComctlLib.ListItem Dim intSelItem As Integer
intSelItem = Item txtWord.Text =
lstView.ListItemsintSelItem.ListSubItems1.Text txtMeaning.Text =
lstView.ListItemsintSelItem.ListSubItems2.Text gintIdItem =
lstView.ListItemsintSelItem.ListSubItems3.Text End Sub
Private Sub mnuabout_Click frmAbout.Show
End Sub Private Sub mnuExit_Click
End End Sub
Private Sub InitConnection Dim conDBString As String
Universitas Sumatera Utara
conDBString = Provider=Microsoft.Jet.OLEDB.4.0; Data Source= App.Path \Kamus.mdb
Set gAdoConn = New ADODB.Connection gAdoConn.ConnectionString = conDBString
gAdoConn.Open End Sub
Private Sub PopDatastrTextSearch As String Dim lstX As ListItem
Dim strSQL As String Dim rs As ADODB.Recordset
Dim intCounter As Integer If strTextSearch = Then
strSQL = select from GerToIndo Order by
Istilah ASC Else
strSQL = Select from GerToIndo Istilah _ where Istilah like + strTextSearch +
order by Istilah asc End If
Set rs = New ADODB.Recordset rs.Open strSQL, gAdoConn, 3, 1
lstView.ListItems.Clear
Universitas Sumatera Utara
With rs If .RecordCount 0 Then
.MoveFirst intCounter = 1
While Not .EOF Set lstX = lstView.ListItems.Add, ,
intCounter lstX.ListSubItems.Add = TrimIstilah
lstX.ListSubItems.Add =
TrimIstilahDesc lstX.ListSubItems.Add = TrimID
intCounter = intCounter + 1 .MoveNext
Wend End If
End With End Sub
Private Sub txtSearch_Change PopData txtSearch.Text
End Sub
5. Video