Thnks for the last one Hans – you really are a fabulous help,
I’m using the code to add a relationship –
Set relRelationship = dbDatabase.CreateRelation(strRelationship, strTableOne, strTableMany, dbRelationUpdateCascade)
relRelationship.Fields.Append relRelationship.CreateField(strFieldOne)
relRelationship.Fields(strFieldOne).ForeignName = strFieldMany
dbDatabase.Relations.Append relRelationship
but I get an error “invlalid field definition in definition of index or relationship” I think there is a problem in the second last line but I can’t work it out.