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

How to make the events of Page occur? 1

Status
Not open for further replies.

seaport

MIS
Jan 5, 2000
923
US
I am designing a form with a Tab control. I created click event procedure for each page of the tab control. However, I can not figure out how to make these events occur. Also, I find out that I even can not make doubleclick and mousedown events of Page occur.<br>
<br>
Moreover, when I used a calendar control, I could not figure out how to make onupdate event occur. So I have to use Afterupdate event of the calendar control.
 
have you tried a Gotfocus or Lostfocus event? <p>Taleya<br><a href=mailto:thezoomistress@yahoo.com.au>thezoomistress@yahoo.com.au</a><br><a href=homepages.ihug.com.au/~taleya>Gorillaweed Graphics</a><br>You spam me, I castrate you
 
did you put the Click event procedure on the tab, or did you actually put it on the page itself? if it is on the page itself it would require you to click on the open area of that page. <br>
what are you trying to accomplish, there may be easier ways to do it. <p>Brian Famous<br><a href=mailto:bfamous@ncdoi.net>bfamous@ncdoi.net</a><br><a href= > </a><br>
 
It's hard to find the place to click on a tab. If you drag a control over to the form, you see a large black area appear. Somewhere between the top edge of the page and the top edge of that black area ( and conversely the bottom edge of the page and the bottom edge of that black area), you can get the click to work. This would be ridiculous for a user so Taleya's idea or adding a button to click works better. Another option is to put a subform on the tab control. It's a lot easier to click on. Finally, there is no OnUpdate event on a tab page or a tab.
 
Thanks for your responses.<br>
<br>
I made this question too complicated. Basiclly, this form is used to print two reports. Different criteria of the two reports are put into two pages of this tab control. Since there is only one &quot;Preview&quot; button in the form, I need to know which page the user uses just before he/she clicks the &quot;Preview&quot; button. Therefore I know which report to be previewed.<br>
<br>
I still can not figure this out. There is no GotFocus event for Page, unfortunately. Although I know how to make click event of the page occur, as Elizabeth said, my problem is not solved. The user may click on controls in the page only and never click on the &quot;Black area&quot;. Clicking on one control in a page does not make the click event of the page occur.<br>
<br>

 
How about putting a subform on each page of the tab. On the subform, place the input fields and the button.
 
...More for the benefit of future readers like me...

Crux of the main question:
&quot;I need to know which page the user uses just before he/she clicks the &quot;Preview&quot; button.&quot;

The .Value property of a TabControl is *always* the value of the .PageIndex property of the currently selected page. That's how the control was built.

If your TabControl is called tabTC, then use:
tabTC.Pages(tabTC.Value)
to refer to the currently selected page itself. For instance:
tabTC.Pages(tabTC.Value).Name
would give you the name of the currently selected page itself.

I suspect you wanted to use the OnChange, GotFocus, Click, or other events to set a global variable, so you could check it to find out which page is selected. If so, the above is better and more efficient.

Also by the way, The OnChange event of *THE TABCONTROL* will fire whenever a new page is selected. No need to try to capture stuff that happens to the pages. :)

And I've noticed the following. There's a TabControl. There's this strip of &quot;tabs&quot; that can be used to select pages. And there's these pages, which are separate from the tabs used to select them. Selecting any of these independently can require a bit of attention, especially since you can click on the form if you click an empty area inside a page's borders (at least in Design View).

Good Luck, All.
-- C Vigil =)
(Before becoming a member, I also signed on several posts as
&quot;JustPassingThru&quot; and &quot;QuickieBoy&quot; -- as in &quot;Giving Quick Answers&quot;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top