do case case arrowup if bof() locate else skip -1 if bof() locate endif endif thisform.refresh() case arrowdown if eof() go bott else skip if eof() go bott endif endif thisform.refresh() endcase I put the container class in a grid, when the user press the down arrow key, focus always gets set to the 2nd textbox and not the first. I tried putting a setfocus to the first textbox in the above code and it didn't work. Anybody have any suggestions. The uparrow key works fine. Thanks for your help. Randy