Unfortunately, I have a bound datagrid

I enter the following command

dtaCustomers.RecordSource = "SELECT * FROM tblCustomers where Code like '" & CustName & "'"

Then I

dtaCustomers.Refresh

and finally this code

If dtaCustomers.Recordset.BOF Then Exit Sub

This last line is ALWAYS BOF= true unless I put a 5 second pause in the program, or step through it slowly.

It appears the dtaCustomers.Refresh takes a long time to refresh.

Is there a better way to refresh?

I don't really want to rewrite the whole routine.