Command Button Properties

T

Tom

I have the following:
Command Button "NewRecord"
Combo Box "Dispatcher"

I would like when I click on "NewRecord"
and the new form appears for data entry,
I would like the cursor to appear in
Combo Box "Dispatcher"

How do I do this?
Tom
 
K

Klatuu

Tom said:
I have the following:
Command Button "NewRecord"
Combo Box "Dispatcher"

I would like when I click on "NewRecord"
and the new form appears for data entry,
I would like the cursor to appear in
Combo Box "Dispatcher"

How do I do this?
Tom
 
K

Klatuu

Is the NewRecord button on the same form with the Dispatcher Combo box or
does the NewRecord button open a different form?

If it is the same form, then all you need it to put this line as the last
line of the Click Event of the NewRecord button:
Me.Dispatcher.Setfocus

If the New Record button is opening a different form where the Dispatcher
combo is, there are a couple of ways to do this. The easiest is to set the
Tab Order of the form so that the Dispatcher combo is the first control in
the Tab Order. If, for some reason, you can't do that, then use the OpenArgs
argument when you open the form. Pass a value from the calling form in Open
args, then test OpenArgs in the form being opened and if it is the correct
value, set the focus to the combo.
 
Top