You'v put the search code into a thread, so far so good but the first thing you do in this thread (search method) is escaping the thread and going back to the GUI thread where you then do all the searching.
The thread.sleep causes the entire GUI (since that's the thread where your code is running now) to freeze (this is normal behavior).
You'll have to change your code to something like this: (disclaimer NOT tested)
Public Sub search()
Try
cmdoledb.CommandText = "SELECT NAME FROM table1 WHERE ID=" & CInt(txtid.Text)
cmdoledb.CommandType = CommandType.Text
cmdoledb.Connection = cnnoledb
Dim rdroledb As OleDbDataReader = cmdoledb.ExecuteReader
While rdroledb.Read = True
updatetext(rdroledb.Item(0).ToString)
Thread.Sleep(2000)
tictac()
End While
t1.Abort()
Catch ex As Exception
MsgBox(ex.Message)
End Try
cmdoledb.Dispose()
End Sub
private sub updatetext (text)
If Me.InvokeRequired Then
Me.Invoke(Me.Invoke(New MethodInvoker(AddressOf updatetext ,text)))
Else
txtnam.Text &= text
end if
end sub
This should help you get on your way, I'll see if I can improve on it when I have some more time.