Hi Linda,
>Tim,
>
>Okay, I finally figured out the problem, with some help from Josh Horne at OakLeaf. The error was occurring because the code I was testing for uniqueness was the primary key. I was trying to avoid having an auto-assigned key and a user-selected key. As it turns out, the primary key test is checked before the rules are checked. I have now changed the table structure to have an auto-assigned integer key and a separate, user-assigned code and the rule for uniqueness works fine. Many thanks to you for all your help with this. Thanks, also, to Bob and Maurizio.
>
That is a good piece of information to tuck away for future. As a matter of rule of my own I always create surrogate keys. If the user needs a code of somekind it it seperate from the PK surrogate key. I didn't realize the framework checked this prior to the rules so good to know.
Glad you got it figured out.
Tim
Timothy Bryan