MS Access and DDL - how to set Indexed, Validation rule...
Posted on 2008-01-26
I am trying to create access database (tables, fields and relationships) with SQL queries, and I am done most of the job, but having problems with these:
1) how to set property indexed to: Yes, Duplicates OK (need it for the foreign keys).
2) How to set the Validation rule property? While creating the table, I have tried:
CONSTRAINT constraint_name CHECK (fieldname > 0)
it doesn't throw any error, but when I open database in MS Access, it doesn't show up in design view under the Validation Rule for this field.
3) how to set the Format property of the Yes/No field to one of the 3 given values?
4) I am curious about one thing: what happens when in relationship window I connect two tables and I leave the Enforce referential integrity unchecked (I need it unchecked because its an optional for user to enter)? Are anything created in the background, or is it just shown visually in relationship window to we can know what is related to what?