Sheets("¸ê®Æ").Range("A2:CE" & r).ClearContents
UF1.LBox1.Clear
'«Å§iª«¥ó
Dim mycon As New ADODB.Connection
Dim myrs As New ADODB.Recordset
If UF1.TB2.Text = "" Then
Set myrs = mycon.Execute("select * from ¸ê®Æ where ±ø¥ó '%" & Trim(UF1.TB1.Text) & "%'")
Sheets("¸ê®Æ").Range("a2").CopyFromRecordset myrs
myrs.Close
mycon.Close
Set myrs = Nothing
Set mycon = Nothing
r=sheets("¸ê®Æ").range("b1").end (xldown).row
For I = 2 To r
If UF1.TB1.Text = Sheets("¸ê®Æ").Cells(I, 2) Then
UF1.LBox1.AddItem Trim(Sheets("¸ê®Æ").Cells(I, 2)) & " " & Trim(Sheets("¸ê®Æ").Cells(I, 3)) & " " & Format(Trim(Sheets("¸ê®Æ").Cells(I, 4)), "e/m/dD") & " " & Trim(Sheets("¸ê®Æ").Cells(I, 10)) & " " & Trim(Sheets("¸ê®Æ").Cells(I, 11))
End If
Next I
End If
If UF1.TB1.Text = "" Then