
Problem setting focus to specific control from form load event
I'm trying to set the focus to a specific control in the form's load event,
but it seems to be ignoring the command. The form has four or five
textbox's and the tab order was set at design time. At run time if I can
get the values for the first two textboxes from the registry I want to set
the focus to the third textbox.
I've tested the return value from the statement: myTextBox.Focus() and it
returns FALSE. I've added a command button and coded the clicked event with
the same command and it works fine. Is there some problem with using the
load event, i.e. the form is not visible so focus can not be set? If that
is true is there a way to do this after the form loads? The form in
question is a modal form so I don't have direct access to the forms
properties after it is displayed.
Also is there any way to "Post" a command, i.e. put a command in the Event
Que or Command Que?
TIA,
James Knowlton