Tab Page

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

Guest

I have created a tab page on my form and when I finish with the last text box
on the first page I would like to go directly to the 2nd tab page and then
the 3rd and so on. Can this be done?

Thanks
Lisa
 
In the LostFocus event of the last text box on the first page, set focus to
the first text box of the second page.
 
Is this done with a macro or expression builder?

Douglas J Steele said:
In the LostFocus event of the last text box on the first page, set focus to
the first text box of the second page.
 
I always use VBA.

Select the last text box on the first page, and look at the Properties of
it. On the Events tab, you'll find an event On Lost Focus. In the box to the
right of that, select "[Event Procedure]" from the list of possibilities,
then click on the ellipses (...) to the right of that. You'll be taken into
the VB Editor, in the middle of a block of code that looks like:

Private Sub MyField_LostFocus()

End Sub

In between those two lines, type:

Me.MyOtherField.SetFocus

(replace MyOtherField with the actual name of the field to which you want to
the cursor to move):



Private Sub MyField_LostFocus()

Me.MyOtherField.SetFocus

End Sub
 
Is this correct.....Private Sub Combo48_Me.MyOtherID.SetFocusLostFocus().

Douglas J Steele said:
I always use VBA.

Select the last text box on the first page, and look at the Properties of
it. On the Events tab, you'll find an event On Lost Focus. In the box to the
right of that, select "[Event Procedure]" from the list of possibilities,
then click on the ellipses (...) to the right of that. You'll be taken into
the VB Editor, in the middle of a block of code that looks like:

Private Sub MyField_LostFocus()

End Sub

In between those two lines, type:

Me.MyOtherField.SetFocus

(replace MyOtherField with the actual name of the field to which you want to
the cursor to move):



Private Sub MyField_LostFocus()

Me.MyOtherField.SetFocus

End Sub

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


teelee said:
Is this done with a macro or expression builder?
 
Should I be able to run this after I enter this info?

Douglas J Steele said:
I always use VBA.

Select the last text box on the first page, and look at the Properties of
it. On the Events tab, you'll find an event On Lost Focus. In the box to the
right of that, select "[Event Procedure]" from the list of possibilities,
then click on the ellipses (...) to the right of that. You'll be taken into
the VB Editor, in the middle of a block of code that looks like:

Private Sub MyField_LostFocus()

End Sub

In between those two lines, type:

Me.MyOtherField.SetFocus

(replace MyOtherField with the actual name of the field to which you want to
the cursor to move):



Private Sub MyField_LostFocus()

Me.MyOtherField.SetFocus

End Sub

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


teelee said:
Is this done with a macro or expression builder?
 
No, it's not correct.

See how I have 3 separate lines?

Private Sub Combo48_LostFocus()

Me.MyOtherID.SetFocus

End Sub

Reread the instructions I gave if you're not familiar with coding in VBA.

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


teelee said:
Is this correct.....Private Sub Combo48_Me.MyOtherID.SetFocusLostFocus().

Douglas J Steele said:
I always use VBA.

Select the last text box on the first page, and look at the Properties of
it. On the Events tab, you'll find an event On Lost Focus. In the box to
the
right of that, select "[Event Procedure]" from the list of possibilities,
then click on the ellipses (...) to the right of that. You'll be taken
into
the VB Editor, in the middle of a block of code that looks like:

Private Sub MyField_LostFocus()

End Sub

In between those two lines, type:

Me.MyOtherField.SetFocus

(replace MyOtherField with the actual name of the field to which you want
to
the cursor to move):



Private Sub MyField_LostFocus()

Me.MyOtherField.SetFocus

End Sub

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


teelee said:
Is this done with a macro or expression builder?

:

In the LostFocus event of the last text box on the first page, set
focus to
the first text box of the second page.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I have created a tab page on my form and when I finish with the
last text
box
on the first page I would like to go directly to the 2nd tab page
and then
the 3rd and so on. Can this be done?

Thanks
Lisa
 
Back
Top