Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2012-12-22
2
Medium Priority
?
347 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 9

Accepted Solution

by:
sognoct earned 1500 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

636 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