Solved

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

Posted on 2012-12-22
2
320 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
ID: 38715950
the command is simple

CurrentDb.Relations.Delete "RelationName"
0
 

Author Closing Comment

by:CRB1609
ID: 38716043
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sum in Split Form 17 27
Error can't find table ?? 5 24
How to get query to return one row for each unique part # 2 13
2 subforms 1 main form 1 13
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

856 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