drummerboy
asked on
Multipage Control
Yet another difficult one - researched all manner of books and net without success!
I have a Multipage object of three pages. I want to control which Multipage is visible/selected/top-most when I execute the setfocus on a text box in that page - otherwise it generates an error.
Two of us have tried to solve this - one very experienced VB/Access programmer and me, the novice.
There is no guarantee that the necessary Multipage.page will be open on entering the form - I can test for that. The problem is leaving the form, if the data causes an error (which I check for) I need to force the user to the approrpiate multi.page(i) and setfocus to the textbox!!
Easy - should be written somewhere one would think?
I have a Multipage object of three pages. I want to control which Multipage is visible/selected/top-most when I execute the setfocus on a text box in that page - otherwise it generates an error.
Two of us have tried to solve this - one very experienced VB/Access programmer and me, the novice.
There is no guarantee that the necessary Multipage.page will be open on entering the form - I can test for that. The problem is leaving the form, if the data causes an error (which I check for) I need to force the user to the approrpiate multi.page(i) and setfocus to the textbox!!
Easy - should be written somewhere one would think?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You may need to PutFocus on the form first if it has lost it.
So in order
PutFocus Form1.hWnd 'Set focus to from
MultiPage1.Value = 0 'Set visible page to index 0
PutFocus Text1.hWnd
PutFocus Form1.hWnd 'Set focus to from
MultiPage1.Value = 0 'Set visible page to index 0
PutFocus Text1.hWnd
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
-->Accept JohnMcCann's comment as Answer
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER
GPrentice00
Cleanup Volunteer
I will leave a recommendation in the Cleanup topic area that this question is:
-->Accept JohnMcCann's comment as Answer
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER
GPrentice00
Cleanup Volunteer