>>>>My program has a BROWSE window (yes I know how evil they are but it is an older system and it does have them). When the client tabs or clicks to say the third column and then presses the ADD button, the code adds a new row to the table. But the focus is still on the third column of the new row. How do I get the focus to the first column (or any specific column) of the new row?
>>>>
>>>>Brenda
>>>
>>>Brenda,
>>>Here is one way but it's involved and I haven't tested it.
>>>
>>>1. For each field in the Browse, add a :W = MyFunction(Column Number).
>>>2. Create a MyFunction that saves the passed column number to a variable (private).
>>>3. Based on where you want to navigate to, build a string of {LEFTARROW} or {RIGHTARROW} to use to stuff the keyboard buffer. If the navigation field is less than the current field, use the rightarrow, if greater, use the leftarrow.
>>>4. After you append balnk, call a navigation function that use ACTIVATE WINDOW to activate the Browse window and stuff the keyboard appropriately.
>>>
>>>HTH.
>>
>>The {LEFTARROW}/{RIGHTARROW} will move a cursor to the previous/next position in a column not to the previous/next column. {BACKTAB}/{TAB} should be used instead.
>
>You can use that or add a {CTRL+A} to make sure the cell is selected instead of the navigating internal to the cell. But I like your way better. BTW, where did you pick up BACKTAB as it isn't documented in the FPW help. Experience?
It is documented in my foxpro 2.6 help file under 'ON KEY LABEL' topic
--sb--