I have added the following code to my add button (at the end of the click event):
IF this.parent.editmode
KEYBOARD '{TAB}{TAB}'
ENDIF
And, at the end of my edit button's click event, I have:
IF this.parent.editmode
KEYBOARD '{TAB}'
ENDIF
After you click on add, say, then the next (per taborder) button on your command bar get's the focus. This may not be the best way, but it was simpler than scanning through the form's controls to find out who is next.
HTH
>I have got a form with picture buttons (wizstyle.vcx) on it. If I click on the picture for a new record or the edit\revert button it does not place the cursor in the first blank textbox (new record) or in the first textbox (edit/revert) I have to click in the textboxes with the mouse. I would like the cursor to be place in the first text box. Has it got something to do with the setting of the tab order?
>
>Advice would be appreciated.
>
>Petrus