First be sure that the cursor is created in the form's load event so it exists when the grid is created. Then add the one line of code to your textbox valid event as noted below.
sele curreceipt
for a = 1to 20
appeblanendfgotop* Add the following line to your codeThisform.Grid.Refresh()
This will refresh the grid and let it discover that it has records now. Then it will accept focus.