C
Chris O''Neill
Hi, folks!
I'm trying to modify a relationship by removing the enforced referential
integrety with cascade updates. Here's my code:
'********** Begin Code *************
Dim db As DAO.Database
Dim rel As DAO.Relation
Set db = DBEngine(0).OpenDatabase("bbms_DATA.mdb", , ,
"Jet;UID=someuser;PWD=password")
Set rel = db.Relations!tblFinancialAccountTypestblFinancialAccounts
With rel
.Attributes = dbRelationDontEnforce
End With
db.Relations.Refresh
Set rel = Nothing
Set db = Nothing
'********** End Code *************
When the code runs, it gets as far as the line ".Attributes =
dbRelationDontEnforce" and then I get an Error #3219 - Invalid Operation.
What am I doing wrong?
Any and all help and suggestions will be greatly appreciated!
Regards,
Chris
I'm trying to modify a relationship by removing the enforced referential
integrety with cascade updates. Here's my code:
'********** Begin Code *************
Dim db As DAO.Database
Dim rel As DAO.Relation
Set db = DBEngine(0).OpenDatabase("bbms_DATA.mdb", , ,
"Jet;UID=someuser;PWD=password")
Set rel = db.Relations!tblFinancialAccountTypestblFinancialAccounts
With rel
.Attributes = dbRelationDontEnforce
End With
db.Relations.Refresh
Set rel = Nothing
Set db = Nothing
'********** End Code *************
When the code runs, it gets as far as the line ".Attributes =
dbRelationDontEnforce" and then I get an Error #3219 - Invalid Operation.
What am I doing wrong?
Any and all help and suggestions will be greatly appreciated!
Regards,
Chris