George,
Sorry for unrelated message. I've just sent you a e-mail testing Nigel's class. Check, if you receive this message, please. Also it seems to use Outlook Express, not GroupWise for sending messages. How can I check, what is my default Mail program and how can I set it programmatically?
>>I want to be able to hit enter in a textbox and the code to execute for that textbox and then return focus to that textbox. I have two lines of code in the valid event but when I press enter I go to the next control on the form, I can't set focus to the textbox in the valid event. How would I do this?
>>
>>Thanks,
>Tyler,
>
>While both Tom and Nadya are correct, you can also return a logical value from the valid event to prevent the cursor from leaving a control. I prefer using this technique over using a numeric for a couple of reasons. Chiefly because I can simply assign the return value in the function based on a logical expression. For example, if the control needs to accept a date field and the date field needs to be a date in the future: llresult = (This.Value > DATE()) acheives the desire effect.
>
>You should also know that return a numeric value from the Valid event can control where the cursor goes next.
If it's not broken, fix it until it is.
My Blog