Requery on a Tab Control - OnClick

C

Commish

Good Morning All.

Here's where I am at... I have a MAIN form, with Tab controls, and
more tab controls within the tabs.

For example, In the "League Office" tab, I have tabs within it:
"Teams", "Auction Results", and "Standings"

When I update records on other forms - the information in the League
Office tabs does not update. OK, I can click on the Refresh All button
and that works, but, if I could make an OnClick event on the tab, that
would be better - it would update each time I look at that tab. Right
now, my code looks like this - it doesn't error out, but I'm not sure
that it runs as the data doesn't refresh in the tabs.

Private Sub Page69_Click()

Me!frm11_LeagueOffice.Requery

End Sub


The frm11_LeagueOffice is the form on the tab, and there are three
tabs within that tab. Should I be requery-ing the parent tab, or the
children tabs? Should I be requerying the query or the form?

Thanks
 
F

Fran Lombard

I think the On_Click is more associated with the page and not the actual tab on the top of the page.

Test to see if your event fires when you click below the tab.

Not sure how to solve the problem but this may help a little.
 
J

John W. Vinson

Private Sub Page69_Click()

Me!frm11_LeagueOffice.Requery

End Sub

The Click event is tempting but isn't the correct event for this purpose - it
fires when you click anywhere on the *face* of the tab page. It's not all that
useful for much of anything IME!

Instead use the Tab Control's Change event.
--

John W. Vinson [MVP]
Microsoft's replacements for these newsgroups:
http://social.msdn.microsoft.com/Forums/en-US/accessdev/
http://social.answers.microsoft.com/Forums/en-US/addbuz/
and see also http://www.utteraccess.com
 
C

Commish

The Click event is tempting but isn't the correct event for this purpose - it
fires when you click anywhere on the *face* of the tab page. It's not allthat
useful for much of anything IME!

Instead use the Tab Control's Change event.
--

             John W. Vinson [MVP]
 Microsoft's replacements for these newsgroups:
 http://social.msdn.microsoft.com/Forums/en-US/accessdev/
 http://social.answers.microsoft.com/Forums/en-US/addbuz/
 and see alsohttp://www.utteraccess.com

The click event is tempting, because it is the best choice.

Would there be a reason why I do not have the opportunity to use the
OnChange event?

The only events listed on my tab control are : on Click, on Dbl Click,
on Mouse Down, on Mouse Up, and on Mouse Move.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Requery tabbed documents 2
tab control 3
Tab control on tab control 1
Tab control within a tab control 1
Bug in tab control? Access 2007 2
Detect tab id 1
search causes tab selection 2
Tab Controls 2

Top