473,378 Members | 1,426 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Copying relationships window from one db to the next

I have written some code to export all objects to text files, and to
import those files back into a new database. Hopefully this will
eliminate some forms of corruption.
The icing on the cake would be to copy the relationships window as
well.
So far, I was trying this code below, but it doesn't work. First off,
I'm surprised that on several MDBs the count of objects is 2. I was
expecting 1 because an MDB can have only 1 relationship window. I can
live with that. But the SaveAsText line fails with error 2001 - You
canceled the previous operation. Bogus, of course, but there you have
it.
Any suggestions on how to copy the relationships window? Some MSysXxx
tables perhaps?

Set cnt = db.Containers("Relationships")
For Each doc In cnt.Documents
appData.SaveAsText acDiagram, doc.Name, cnt.Name & "_" &
doc.Name & ".txt"
Next doc

PS: I am not talking about copying the relationships between the
tables. I got that covered. I'm only talking about the Relationships
window, where my tables may be laid out in a nice format.

-Tom.

Nov 13 '05 #1
3 1839
<putting on "I know what I'm doing mask"... or should I preface this
with "Pay no attention to the man behind the curtain..."?)

You might have a look at MichKa's app that does that for v9. You could
send him a note and see what he knows or if he's done a version for
v10/XP.

Nov 13 '05 #2
Tom, take a look at what Stephen Lebans has done here:
http://www.lebans.com/saverelationshipview.htm

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Tom van Stiphout" <no*************@cox.net> wrote in message
news:68********************************@4ax.com...
I have written some code to export all objects to text files, and to
import those files back into a new database. Hopefully this will
eliminate some forms of corruption.
The icing on the cake would be to copy the relationships window as
well.
So far, I was trying this code below, but it doesn't work. First off,
I'm surprised that on several MDBs the count of objects is 2. I was
expecting 1 because an MDB can have only 1 relationship window. I can
live with that. But the SaveAsText line fails with error 2001 - You
canceled the previous operation. Bogus, of course, but there you have
it.
Any suggestions on how to copy the relationships window? Some MSysXxx
tables perhaps?

Set cnt = db.Containers("Relationships")
For Each doc In cnt.Documents
appData.SaveAsText acDiagram, doc.Name, cnt.Name & "_" &
doc.Name & ".txt"
Next doc

PS: I am not talking about copying the relationships between the
tables. I got that covered. I'm only talking about the Relationships
window, where my tables may be laid out in a nice format.

Nov 13 '05 #3
On Thu, 17 Mar 2005 19:57:45 +0800, "Allen Browne"
<Al*********@SeeSig.Invalid> wrote:

Looks very promising. Thanks for the link.
-Tom.
Tom, take a look at what Stephen Lebans has done here:
http://www.lebans.com/saverelationshipview.htm


Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Ed | last post by:
I am running Access 2002 and just ran the built in Access wizard for splitting a database into a back end (with tables) and front end (with queries, forms, modules, etc.). After running the...
2
by: Max | last post by:
Hi. I really hope someone can help me. Going slowly insane with this problem. I have a two Access 2000 databases. One is the backend containing tables and some admin queries. The other is the...
3
by: news.giganews.com | last post by:
Does anyone know if there's an easy way to export or copy the relationship structure from one mdb to a new one? The relationships in the db are time consuming to reproduce. I am trying to make a...
45
by: salad | last post by:
I'm curious about your opinion on setting relationships. When I designed my first app in Access I'd go to Tools/Relationships and set the relationships. Over time I'd go into the window and see...
4
by: alexandre.brisebois | last post by:
Hi, I am using access 2003, I would like to know if there is an option to reorganize the tables in a maner that is readable, as we can do in sql sever 2000 or 2005. I have been given a database...
5
by: mark_aok | last post by:
Hi all, I have a situation where I have a split database. At the back end, I need to - create a new table (I will call it newTable) with the exact fields, and relationships as another table...
8
by: Phil Stanton | last post by:
I have a FE, BE database on my home computer and a duplicate on the office computer. Both use Ak2 on Windows XP. The one at home appears normal. The BE consists of about 50 tables with numerous...
2
by: troy_lee | last post by:
What is the best way of copying all the records from a linked table into a replica table that is local on my computer? This is for development work at home where I can not access the main table. Is...
5
by: terrybell105 | last post by:
I downloaded Stephan's utility from his website but can't get it to work - or maybe I'm not driving it properly! The form works OK with the existing 3 "views" - I can switch between them and they...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.