>I'm using the valid event in a text box to verify input data. I'm using the numeric return value option to send focus to the next contol. > > >The Valid event can also return a numeric value. Returning a numeric value has one of three effects: > >· If 0 is returned, the control does not lose focus. >· If a positive value is returned, the value specifies the number of controls the focus advances. For example, if the Valid event returns 1, the next control gets the focus. >· If a negative value is returned, the value specifies the number of controls the focus moves back. For example, if the Valid event returns –1, the previous control gets the focus. > > >The Help file indicates a relative move. I'm getting an absolute value for the return value. For example, Return 7 - focus goes to contol 7, return 5 - focus goes to control 5. etc. I've tested SEVERAL different examples. > >I need the relative move, any suggetions.
It's consistent solution to use SetFocus to move focus to the control you really need in. You may move your code to Control.LostFocus event and fire conditionally SetFocus from there.