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

Shamil Salakhetdinov shamil at smsconsulting.spb.ru
Tue Oct 27 17:05:18 CDT 2009


OK, sorry mixed MS Access Tab controls with VB6 SSTab and C#/VB.NET Tab
controls - I programmed a VB6/VB.net add-in in the past, which worked with
all the three host IDEs - and the latter two Tab controls can be stacked -
that "past memory" caused my current confusion...

Thank you.

--
Shamil

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Tuesday, October 27, 2009 11:52 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] SPAM-LOW: Re: Form Controls - Class implementation

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
>  
> 
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4549 (20091027) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru


 

__________ 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