Modify relation attributes

B

Brian

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)
 
D

Dirk Goldgar

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top