ro*****@hotmail.com (R Bolling) wrote in message news:<6e**************************@posting.google. com>...
Hi, I have a table where two fields will make up the primary key. In
a few cases the second field will be blank. When I try to append the
existing data into the keyed table I get the message that it cannot
append a null value into the keyed field.
Is there any way to set this up to allow the nulls in that second
field?
Thanks for any assistnace with this.
Robbie Bollinger
Robbie: Ran into this myself recently, and had solved it this way:
Don't use a multi-field key.
Make a numeric field as you PK. Programmatically increase the ID
number (of course don't use AutoNumber). Then, open the Indexes
display (right next to the PK toolbar button) and manually create a
new index.
In the Index Name field, enter "SecondaryKey" (or whatever you want).
Enter your first field name on that same row. Enter the second in the
next row. Move back up to the row above, and then, in the bottom half
of the pop-up, change "Unique" to Yes, and "Ignore Nulls" to Yes.
You can't ignore nulls on the primary key, but any others are
perfectly acceptable. Hopefully this works for your project.
Anthony.