Unanswered: relation problem 2
Sorry to post this question again.
But now I have another problem
Dim dbs As DAO.Database, rel As Relation, fld As Field
' Return reference to current database.
Set dbs = CurrentDb
' Create new Relation object and specify foreign table.
Set rel = dbs.CreateRelation("adresse_kunde", _
' Set attributes to enforce referential integrity.
rel.Attributes = dbRelationUpdateCascade And _
' Create field in Relation object.
Set fld = rel.CreateField("adr_id")
' Specify field name in foreign table.
fld.ForeignName = "adr_nr"
' Append Field object to Fields collection of Relation object.
' Append Relation object to Relations collection.
Set dbs = Nothing
I have this piece of code and it says to me in the line
cannot create relation on ODBC Tables
But I can create a relation with the GUI
But i need the creation in code
Has anyone a idea what's going wrong???
--Postgresql is the only kind of thing--