* Changetabs - custom form method lparameters tnPage lcAlias = alias() select description from category ; where !deleted() ; into cursor tmpCursor with thisform.pageframe1 .pagecount = reccount() scan .pages(recno()).caption = tmpCursor.description endscan .pages(tnPage).fontbold = .t. endwith use in "tmpCursor" if !empty(lcAlias) select (lcAlias) endif * Button.click changing tabs thisform.changetabs(2)This one works on my test form. An alternative code:
* Changetabs - custom form method lparameters tnPage select description from category ; where !deleted() ; into array aTmp with thisform.pageframe1 .pagecount = alen(aTmp) for ix = 1 to .pagecount .pages(ix).caption = aTmp[ix] endfor .pages(tnPage).fontbold = .t. endwithBoth works. "Not working" you mean you lose controls on pages say 5, when pagecount decreased to 4 and increased back to 5 or something like that ? Maybe related code is never called (an if structure ?), put a wait window there to see if that's the case.