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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

listbox and pageframe problem

Status
Not open for further replies.

cyrilf

Programmer
Jul 21, 1999
6
0
1
CA
I have a form with a pageframe containing 5 pages. The first page has a listbox. When I click on an "add" button to add a new record, I activate the 1st page with:

THISFORM.pgframe.page1.setfocus()

Everything works fine if I am on the 1st page when I press the "add" button. However, if I am on any other page and I press the "add" button, the 1st page is activated but the list box is not visible. Clicking on another page and then back to the 1st page, the listbox is visible again.

I would appreciate any help in solving this problem

Thanks

 
Try this instead (use you listbox name):
ThisForm.pgframe.ActivePage = 1
ThisForm.pgframe.Page1.mylistbox.setfocus()

Rick
 
Are you certain that the listbox is INSIDE the page and not just 'floating' on top of the pageframe?
 
Rick, your suggestion worked great!

Thanks

Cyril
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top