[AccessD] SPAM-LOW: Re: Form Controls - Class implementation

jwcolby jwcolby at colbyconsulting.com
Tue Oct 27 15:52:02 CDT 2009


Shamil,

Tabs cannot directly contain other tabs, so recursion looking for tab controls on tab controls is 
not necessary.

And no, I made no effort to drill down into tabs on subforms.  However, with a class implementation, 
all you need to do is instantiate the supervisor class in then OnOpen of ANY form and it will 
automatically find and catalog the controls on the form.  If the form is a subform then it will have 
it's own class that could be polled if needed.

I made the class variable public so that it could be manipulated from outside of the form.

John W. Colby
www.ColbyConsulting.com


Shamil Salakhetdinov wrote:
> Guys,
> 
> Recursion could help to make the coding cleaner and more generic, couldn't
> it?
> Does your current version of code support stacked tab controls, tab controls
> within subforms, ...?
> 
> Thank you.
> 
> --Shamil 
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of A.D.Tejpal
> Sent: Tuesday, October 27, 2009 10:39 PM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] SPAM-LOW: Re: Form Controls - Class implementation
> 
> JC,
> 
>     Thanks for providing a nice class based solution so promptly. Your well 
> known command over classes deserves to be complimented.
> 
>     While conducting tests (Access 2003 desktop), it was found that listing 
> of controls on form sections as displayed in the message box, is not always 
> in keeping with the tab index. For example, if the tab index in form header 
> is altered in design view and the form re-opened after saving, the results 
> are not found consistent.
> 
>     It seems that while building the control collection in the class, 
> greater reliability could be achieved by pouring the contents of a temporary
> 
> class into the main one in the order of tab index.
> 
>     It would also appear that the extra round of iteration just for finding 
> tab controls and their pages could be eliminated.
> 
>     Suggested modified versions incorporating the points outlined above are 
> placed below, in the following sequence:
> 
>     (a) Class C_CtlsByTabIndex
>     (b) Class C_CtlsByTabIndexMaster
>     (c) Code in form's module
> 
> Best wishes,
> A.D. Tejpal
> ------------
> 
> <<< snip >>
>  
> 
> __________ Information from ESET NOD32 Antivirus, version of virus signature
> database 4549 (20091027) __________
> 
> The message was checked by ESET NOD32 Antivirus.
> 
> http://www.esetnod32.ru
>  
> 



More information about the AccessD mailing list