I use Validation Rule in form TextBox property.
Error message is in the Validation Text property.
Igor, it sounds like you are using the validation elements of the table and
not in the form. I would recommend *not* using the table validation and
instead use what I posted in the BeforeUpdate event of the TextBox control
for this field.
>I use Validation Rule in form TextBox property.
>Error message is in the Validation Text property.
[quoted text clipped - 4 lines]
>> >
>> >Thanks!

Signature
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.
Tim Ferguson - 29 Sep 2006 20:41 GMT
> Igor, it sounds like you are using the validation elements of the
> table and not in the form. I would recommend *not* using the table
> validation and instead use what I posted in the BeforeUpdate event of
> the TextBox control for this field.
Why do you say this? There are many ways of updating or filling fields in
tables: using a form, using a query, typing into the table datasheet, SQL
embedded in VBA, merging from Excel or Word... even CorelDraw has a VBA
module that can update a database. If the data in the table are to be
protected, then it has to be at the DBEngine level; and that means a
field-level or table-level ValidationRule.
You are half-right, of course. No self-respecting user likes to see a DB
error message about field contents, and no self-respecting developer
should let an error like that get sent to the engine. Therefore,
intelligent handling of e.g. the BeforeUpdate event is required too.
But don't imagine that a bit of code in one form is going to maintain the
integrity of the real data on its own.
Best wishes
Tim F