>>You might try Nodefault before setfocus, sometimes that works...
>
>Thanks, I'll try that. I was trying to lookup "Nodefault" but couldn't find it in Help. What does it do?
You can find it in VFP 5.0 Help. Just in case you don't have it:
NODEFAULT Prevents Visual FoxPro from performing its default event or method processing for Visual FoxPro events and methods. For example, if the KeyPress event occurs, including NODEFAULT in the KeyPress procedure or function prevents Visual FoxPro from placing the key press into the Visual FoxPro keyboard buffer. This allows you to create a KeyPress procedure that lets you test which key is pressed before the key is sent to the keyboard buffer.
NODEFAULT may be placed anywhere within the event or method procedure. Note that NODEFAULT may also be placed within an event or method procedure in the Form Designer.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison