>Often I code with logic like the following:
>
>
>If PemStatus(This.cbo_TypeDesc,'cSourceAlias',5) = .F.
> This.cbo_TypeDesc.mInitSQL
>Endif
>If PemStatus(This.cbo_MFSystem,'.cSourceAlias',5) = .F.
> This.cbo_MFSystem.mInitSQL
>Endif
>If PemStatus(This.cbo_Code,'cSourceAlias',5) = .F.
> This.cbo_Code.mInitSQL
>Endif
>If PemStatus(This.cbo_FullDesc,'cSourceAlias',5) = .F.
> This.cbo_FullDesc.mInitSQL
>Endif
>
>
>It seems redundant. Is there a better way? Thanks!
>
>Regards, Renoir
Hi,
So, the first thing is to ask what you are doing here. You seem to have a number of combo boxes and, if any have a cSourceAlias property, then you call their mInitSQL method.
I guess that you have created the combos from a combo class, subclassed from the combo control in order to create the version with the cSourceAlias property, so why not just put a mandatory call to mInitSQL in the init or refresh (whichever is appropriate) method of the combo class that you have based these controls on.