>>One more complication for Amenities field - this field is 10 char long and it's a concatenation of codes, e.g. ABCUD, where each letter is a code. How would we filter those contain incorrect codes?
>
>For this one, I don't know a simpler alternative than to use a FOR loop.
>
>
>* Function for validation)
>local i
>for i = 1 to len(amenities)
> if not substr(Amenities, i, 1) $ "ABCDE"
> return .F.
> endif
>next
>
>
>Hilmar.
No, I need one SET FILTER TO command, so loop would not work. I guess, I can put all codes in a thisform.cAmenities string, then something using chrtran. However, even this idea has some problems, because Set Filter is another form, which would not now about main form...
If it's not broken, fix it until it is.
My Blog