Option Explicit Dim conn As ADODB.Connection Dim Rs As ADODB.Recordset Dim query As String Sub setConn() Set conn = New ADODB.Connection End Sub Private Sub serachCmd_Click() Set Rs = New Recordset Adodc1.RecordSource = " select * from logfile where no_ponsel = '" & textSearch & "'" Set LogDataGrid.DataSource = Adodc1 'Rs.Open " select * from logfile where no_ponsel = '" & textSearch & "'", conn, adOpenDynamic, adLockOptimistic If Adodc1.Recordset.EOF Then MsgBox "Record not found" Else LogDataGrid.DataSource = Adodc1 /* in this is error and message appear "method and data number not found" LogDataGrid.Refresh End If End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)