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!

Refresh dependant on page

Status
Not open for further replies.

fernandezd

IS-IT--Management
Jan 30, 2002
48
US
Hi

I have got a tab control and pages under it.
I have an automated refresh routine setup on the form for all
the list tables under the pages in the tab control.

How do I get it to detect which one is selected and not refresh the list visable??

PLEASE HELP FernandezD
At your service.
Unix systems Admin
 
I do something similar. My solution is not elegant but it does work.
For each page in the tab control, I use the OnClick event to set a global variable to the index number of the page.
Example: If I have two pages called Bill and Bob then

public intCurrPgIdx as integer

private sub Bob_Click()
dim intX, intCount as integer
intCurrPgIdx = -1
intCount = ctlMyTab.Pages.Count
for intX = 0 To intCount - 1
if ctlMyTab.Pages(intX).Name = "Bob" then
intCurrPgIdx = intX
end if
next intX
end sub

Similarly for Bill.

You can then use the global variable, intCurrPgIdx, to process your pages.

As I said, it's not elegant. If anyone out there has an alternative, I'd be very interested.

Hope this helps.
 
Hi,

I will try this tonight.
Thanks

It looks a bit complicated. How come microsoft did not do this easier.!!

Thanks for your reply FernandezD
At your service.
Unix systems Admin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top