Defaulting to a control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi - I have a form with FOUR TabControlPages in it. When the user has
completed the second, third or fourth TabControlPage details [note: only one
of these additional TabControlPages gets completed per record] I want the
cursor to default back to the FIRST TabControlPage [Caller Details] into the
Date field [Date]

How do I do this? TIA
 
Sue,

In the LossFocus or Exit event of a control (or whereever else you want to
place it),

[Date].Setfocus will get you there unless you are in a subform, then
Parent.[Date].Setfocus.

[Page].Setfocus will move to that page. (Where Page is the Page Name)

God Bless,

Mark A. Sam
 
Hi Mark

I tried the following code in the OnLostFocus of the 'Personal Information'
Form

[Caller Detail].SetFocus ('Caller Details' being the name of the FIRST
TabControlPage.

When I then go to to create a new record I remain on the TabControlPage
where I last entered data - without defaulting back to the first page [ie
Caller Details].

Is there something I'm missing? [I noticed the MSFA Help said the
gotocontol, gotopage doesn't work on TabControlPages - so I'm hoping we can
crack this]. Thanks for your help.

--
Sue Compelling


Mark A. Sam said:
Sue,

In the LossFocus or Exit event of a control (or whereever else you want to
place it),

[Date].Setfocus will get you there unless you are in a subform, then
Parent.[Date].Setfocus.

[Page].Setfocus will move to that page. (Where Page is the Page Name)

God Bless,

Mark A. Sam


Sue Compelling said:
Hi - I have a form with FOUR TabControlPages in it. When the user has
completed the second, third or fourth TabControlPage details [note: only one
of these additional TabControlPages gets completed per record] I want the
cursor to default back to the FIRST TabControlPage [Caller Details] into the
Date field [Date]

How do I do this? TIA
 
Sue,

I guess I'm not following the flow here. Do you think that creating a new
record will take you our of the last control you were in and then fire the
LostFocus event? I don't believe it will.

Try placing [Caller Detail].SetFocus in a button ClickEvent with the Button
also opening a new record or on the CurrentEvent of the form,

If Me.NewRecord Then [Caller Detail].SetFocus

God Bless,

Mark

Sue Compelling said:
Hi Mark

I tried the following code in the OnLostFocus of the 'Personal Information'
Form

[Caller Detail].SetFocus ('Caller Details' being the name of the FIRST
TabControlPage.

When I then go to to create a new record I remain on the TabControlPage
where I last entered data - without defaulting back to the first page [ie
Caller Details].

Is there something I'm missing? [I noticed the MSFA Help said the
gotocontol, gotopage doesn't work on TabControlPages - so I'm hoping we can
crack this]. Thanks for your help.

--
Sue Compelling


Mark A. Sam said:
Sue,

In the LossFocus or Exit event of a control (or whereever else you want to
place it),

[Date].Setfocus will get you there unless you are in a subform, then
Parent.[Date].Setfocus.

[Page].Setfocus will move to that page. (Where Page is the Page Name)

God Bless,

Mark A. Sam


Hi - I have a form with FOUR TabControlPages in it. When the user has
completed the second, third or fourth TabControlPage details [note:
only
one
of these additional TabControlPages gets completed per record] I want the
cursor to default back to the FIRST TabControlPage [Caller Details]
into
the
Date field [Date]

How do I do this? TIA
 
Mark

You're a STAR - thank you so much. I did the following on the OnCurrent:

If Me.NewRecord Then [Date].SetFocus

and it worked. Have a great day.
--
Sue Compelling


Mark A. Sam said:
Sue,

I guess I'm not following the flow here. Do you think that creating a new
record will take you our of the last control you were in and then fire the
LostFocus event? I don't believe it will.

Try placing [Caller Detail].SetFocus in a button ClickEvent with the Button
also opening a new record or on the CurrentEvent of the form,

If Me.NewRecord Then [Caller Detail].SetFocus

God Bless,

Mark

Sue Compelling said:
Hi Mark

I tried the following code in the OnLostFocus of the 'Personal Information'
Form

[Caller Detail].SetFocus ('Caller Details' being the name of the FIRST
TabControlPage.

When I then go to to create a new record I remain on the TabControlPage
where I last entered data - without defaulting back to the first page [ie
Caller Details].

Is there something I'm missing? [I noticed the MSFA Help said the
gotocontol, gotopage doesn't work on TabControlPages - so I'm hoping we can
crack this]. Thanks for your help.

--
Sue Compelling


Mark A. Sam said:
Sue,

In the LossFocus or Exit event of a control (or whereever else you want to
place it),

[Date].Setfocus will get you there unless you are in a subform, then
Parent.[Date].Setfocus.

[Page].Setfocus will move to that page. (Where Page is the Page Name)

God Bless,

Mark A. Sam


Hi - I have a form with FOUR TabControlPages in it. When the user has
completed the second, third or fourth TabControlPage details [note: only
one
of these additional TabControlPages gets completed per record] I want the
cursor to default back to the FIRST TabControlPage [Caller Details] into
the
Date field [Date]

How do I do this? TIA
 
Back
Top