The first line calls the SearchField (textfield view) Textchanged Event with params "" to fill the tableview with all the records from DB
If New = "" Then
DBUtils.ExecuteTableView(sql, "SELECT name, code FROM countries", Null, 100, tableview1)
The second calls the focus on Searchfield (textfield) view.
Maybe if you introduce a delay before calling this lines (with Callsubdelayed or the new sleep function) the tableview1 redraws correctly (difficult without seeing the code)