On Click Event On The Tab Page Fails

  • Thread starter Thread starter doyle60
  • Start date Start date
D

doyle60

I want to requery all the items on a tab page when that tab page is
clicked. There is a Page Event called "On Click," but it doesn't
actually do anything when I put a requery in it.

I put something like this in it:

FreeByGroupsub3.Requery

And nothing happens. Yes, it has the [Event Procedure] showing on the
properties form.

I requery things night and day. Since this isn't working, I have to
put command boxes down to requery items. It would be nicer without
these.

The only other options on the tab page events are:

On Dbl Click
On Mouse Down
On Mouse Up
On Mouse Move

What to do?

Why doesn't the On Click do anything here?

Thanks,

Matt
 
As you found, the page's Click event doesn't fire.
Use the Change event of the tab control.

If you want to limit your code to one page only, compare the value of the
tab control to the PageIndex of the page, e.g.:
If Me.Tab0 = Me.Page1.PageIndex Then
 
I guess you must use the Change event of the tabcontrol. You can figure
out on which page the user is by inspecting the Value property of the
tabcontrol, it points to the page number.
 
The event doesn't fire when the TAB is clicked. It is fired when you
CLICK somewhere on the form. (Learned that the hard way a few days ago.)
 
Thanks to all. I find it a bit hard to believe someone thought it
useful to have the event activate only by clicking on the page, and not
making the actual tab part of that definition. The current design is
not intuitive and it seems to be useless.

Matt
 
Back
Top