tag:blogger.com,1999:blog-7176045.post115815375111098782..comments2007-05-25T12:47:25.007+04:00Comments on Alex & Access: ActiveX controls on Tab control pageAlex Dybenkohttp://www.blogger.com/profile/16954512620659022712noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-7176045.post-46391872011677875442007-05-25T12:47:00.000+04:002007-05-25T12:47:00.000+04:002007-05-25T12:47:00.000+04:00Taking your idea a step further, I found asimpler ...Taking your idea a step further, I found a<BR/>simpler way to avoid the problem. Simply make all controls on all pages of<BR/>the tab control invisible, then run code from the tab control's On Change<BR/>event to make only the controls on the current page visible (also need to<BR/>run it from the form On Open or On Current event so that the controls are<BR/>initially displayed).<BR/><BR/>Below is the code I came up with (for a tab control named "tabMain"). Seems<BR/>to resolve the problem, and allows you to keep all your controls on the tab<BR/>control, instead of moving them off.<BR/><BR/> Dim ctl As Control<BR/> Dim pg As Page<BR/> Dim blnVisible As Boolean<BR/><BR/> For Each pg In Me.tabMain.Pages<BR/> blnVisible = (pg.PageIndex = Me.tabMain)<BR/> For Each ctl In pg.Controls<BR/> ctl.Visible = blnVisible<BR/> Next<BR/> NextNeil Ginsberghttp://www.blogger.com/profile/01696823945484105209noreply@blogger.com