>I have a valid() function for a textbox, so that if the input was "?", then a look-up form is launched to list customers in a grid. The lookup form has an OptionGroup that allows you to filter "Active" customers or "Inactive" customers, or "All" customers. In the click event, I try to pass focus back to the grid after setting the filter, so that the arrow keys can be used to scroll the grid.
>
>Since the form is a child of a calling valid() function, it will not allow the setfocus() command.
>
>What is a work-around, so that the user does not have to click the grid with the mouse in order to begind using the arrow keys again?
>
>When the form is used simply as a customer lookup table, and NOT called from a valid() function, the setfocus() is allowed.
>
>I understand how and why it works like it does, I just need to find a work around.
Try moving your textbox valid() function to the textbox click event. You will have to setfocus back to the textbox when returning .F. from the function.
Michael McLain