Setting CustomConstraint during runtime

Hi all,

i tried to set the customconstraint  and ConstraintErrorMessage
properties
during runtime, but with no effect at all.

ex:

table1.StoreDefs:= false;
table1.FieldByName('REFERENZ').customconstraint:= ' x > 10 and X < 1000
';
table1.FieldByName('REFERENZ').ConstraintErrorMessage := 'Value not
allowed';

I can enter every value in that field (type TFloat), there is no
errormessage.
Did I forget something?
If I do it during designtime (doubleclick on table, adding all fields,
changing constraint-property)
it works, but this is useless, the table may change its layout or
constraints any time.

Appreciate any help

thx
heinrich

--
Heinrich Braun
Taeleweg 23
72275 Alpirsbach, Germany