• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 365
  • Last Modified:

How to delete a relationship from a back-end database in VBA

The back-end is Access 2007 and password protected.

I have done a lot of research on the web but so far nothing worked.

I would really appreciate a complete example function.

Thanks in advance.
0
Clive Beaton
Asked:
Clive Beaton
1 Solution
 
sognoctCommented:
the command is simple

CurrentDb.Relations.Delete "RelationName"
0
 
Clive BeatonAccess DeveloperAuthor Commented:
I had to modify it to get to the back-end:

   Dim db As DAO.Database
   Set db = OpenDatabase(strBackEndFull, False, False, "MS Access;PWD=p@$$w0rd")
   db.Relations.Delete "tblReportstblReportsFieldsSettings"
 
But other than that, it worked.

Thanks very much.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now