Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set Focus In Multipage Object

Microsoft Word How To?

Set Focus In Multipage Object

by  mdav2  Posted    (Edited  )
To set focus to an object in a different page on a multipage object you need to write two lines of code.

Using an example of a multipage called MULTIPAGE1 and a textbox control called TXTOBJECT. You want to switch to the second page and set focus to the TXTOBJECT. You would use the following syntax.

Code:
  Me.Multipage1.Value = 1
  Me.txtObject.SetFocus

The first line changes the multipage forms focus to page 2 and the second is your standard object setfocus syntax.

Remember that page numbers begin at 0 unless base option is changed from 0 to 1.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top