G Guest Oct 16, 2003 #1 Hi to all, I am wondering if it is possible to use VBA to create relationship? Example if possible. Thanks in advance.
Hi to all, I am wondering if it is possible to use VBA to create relationship? Example if possible. Thanks in advance.
T Tim Ferguson Oct 16, 2003 #2 Hi to all, I am wondering if it is possible to use VBA to create relationship? Example if possible. Click to expand... strSQL = "ALTER TABLE MyTable " & vbCrLf & _ "ADD CONSTRAINT MyFK FOREIGN KEY MyField " & vbCrLf & _ " REFERENCES MyOtherTable(MyOtherField);" db.Execute strSQL, dbFailOnError Of course, there is always the long way round. Check the help files for the Relationships collection for further information. HTH Tim F
Hi to all, I am wondering if it is possible to use VBA to create relationship? Example if possible. Click to expand... strSQL = "ALTER TABLE MyTable " & vbCrLf & _ "ADD CONSTRAINT MyFK FOREIGN KEY MyField " & vbCrLf & _ " REFERENCES MyOtherTable(MyOtherField);" db.Execute strSQL, dbFailOnError Of course, there is always the long way round. Check the help files for the Relationships collection for further information. HTH Tim F