Modify relation attributes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I get an "Incorrect use of property" error when I try to modify the
attributes as follows:

rel.Attributes = dbRelationUpdateCascade

What is wrong in my syntax here?

I can simply delete the relation, then re-create it with the correct
attributes using the .CreateRelation method as follows, but this seems like
extra work:

Set rel = .CreateRelation(relName, tblName, tblName2, relAttributes)
 
Brian said:
I get an "Incorrect use of property" error when I try to modify the
attributes as follows:

rel.Attributes = dbRelationUpdateCascade

What is wrong in my syntax here?

I can simply delete the relation, then re-create it with the correct
attributes using the .CreateRelation method as follows, but this
seems like extra work:

Set rel = .CreateRelation(relName, tblName, tblName2, relAttributes)

I'm not sure about this, Brian, but the DAO help topic for the
Attributes property says, "For an appended Relation object, the
Attributes property setting is read-only." To my mind, this means that
once the relation has been appended to the database's Relations
collection, you can't change the attributes. I could be wrong, but I
think you're stuck with deleting the relation and recreating it.
 
Back
Top