Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.
Access, DDL and Constraints
From Wiki
You will find a good deal on DDL (Data Definition Language) In Intermediate Microsoft Jet SQL for Access 2000, including sample code for creating a constraint that references another table, to quote:
CREATE TABLE tblCreditLimit (LIMIT DOUBLE)
INSERT INTO tblCreditLimit VALUES (100)
ALTER TABLE tblCustomers
ADD COLUMN CustomerLimit DOUBLE
ALTER TABLE tblCustomers
ADD CONSTRAINT LimitRule
CHECK (CustomerLimit <= (SELECT LIMIT
FROM tblCreditLimit))
UPDATE TABLE tblCustomers
SET CustomerLimit = 200
WHERE CustomerID = 1
However, this is only available through ADO, you cannot use the above with the query window.
Further Information Intermediate Microsoft Jet SQL for Access 2000: http://msdn.microsoft.com/en-us/library/aa140015(office.10).aspx



LTD Social Sitings
Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.