>Can anyone explain this bizarre behavior?
>
>The following throws a syntax error:
>
What's the error, you're having? Are you sure, the control has this property? Note, not all controls have ReadOnly property, for instance, label doesn't have this property. You may try:
if type('loControl.ReadOnly')="L" and loControl.ReadOnly
....
I haven't tested, so this may require some tweaking.
>FOR EACH loControl IN this.parent.Controls
> IF loControl.ReadOnly
>
> ENDIF
>NEXT
>
>
>So does this:
>
>#DEFINE READONLY -1
>FOR EACH loControl IN this.parent.Controls
> IF loControl.ReadOnly
>
> ENDIF
>NEXT
>
>But this works just fine:
>
>LOCAL lcReadOnly
>lcReadOnly = "ReadOnly"
>FOR EACH loControl IN this.parent.Controls
> IF loControl.&lcReadOnly
>
> ENDIF
>NEXT
>
>
>
>Ray Roper
If it's not broken, fix it until it is.
My Blog