Solved

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

Posted on 2012-12-22
2
295 Views
Last Modified: 2012-12-22
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
Comment
Question by:CRB1609
2 Comments
 
LVL 9

Accepted Solution

by:
sognoct earned 500 total points
Comment Utility
the command is simple

CurrentDb.Relations.Delete "RelationName"
0
 

Author Closing Comment

by:CRB1609
Comment Utility
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

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now