473,378 Members | 1,388 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.

Any way to examine/manipulate relationships layout from code?

Hi all,

I was wondering if anyone has been able to find a way to read layout
information and manipulate the layout in the Relationships window. I've tried
a few different angles, but couldn't find anything.

Thanks,

- Steve J.
Nov 12 '05 #1
8 2073
I have a download at my site, but I forget exactly what it does. Have a look at ...
http://www.amazecreations.com/datafa...stRelation.zip
--

Danny J. Lesandrini
dl*********@hotmail.com
http://amazecreations.com/datafast
"Steve Jorgensen" wrote ...
Hi all,

I was wondering if anyone has been able to find a way to read layout
information and manipulate the layout in the Relationships window. I've tried
a few different angles, but couldn't find anything.

Nov 12 '05 #2
On Jan 15 2004, 04:07 pm, Steve Jorgensen <no****@nospam.nospam> wrote
in news:mc********************************@4ax.com:
I was wondering if anyone has been able to find a way to read layout
information and manipulate the layout in the Relationships window.
I've tried a few different angles, but couldn't find anything.


MichKa has a utility that transfers relationships layout between databases,
and I believe he mentioned once that it is stored as a single BLOB.
Obviously, it is possible to read that, but then you are on your own.

You can always do what the Print Relationships wizard does, and build your
own diagram in code.

--
(remove a 9 to reply by email)
Nov 12 '05 #3
What were you looking to do Steve?
I've played around with the windows that comprise the Relationship
window.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:mc********************************@4ax.com...
Hi all,

I was wondering if anyone has been able to find a way to read layout
information and manipulate the layout in the Relationships window. I've tried a few different angles, but couldn't find anything.

Thanks,

- Steve J.


Nov 12 '05 #4
On Fri, 16 Jan 2004 00:44:58 GMT, "Stephen Lebans"
<Fo****************************************@linval id.com> wrote:
What were you looking to do Steve?
I've played around with the windows that comprise the Relationship
window.


A couple of things. One thing, I could do with the tool Dimirti mentioned,
but I'm always hesitant to copy blobs around with internal meaning I don't
unserstand. For instance, what kind of corruption would be introduced if the
second database was missing a table that was in the original schema?

Basically, I want to back up the visual layout, so if I ever have to repair a
database by importing everything into a new database, I can get back the old
layout. A nice side benefit would be that one could save and restore
different layouts which would provide functionality similar to ADP database
diagrams.
Nov 12 '05 #5
I know decoding the BLOB is the proper way to accomplish what you want
to do but I can suggest an alternative method.
Each of the Table objects in the Relationship window is comprised of two
windows. THe parent window is of the class OEcl and it contains a child
ListBox control window.
I just tried and you can use GetWIndowText to retrieve the Caption of
each of the table object windows which corresponds to the table's name.
You can also get at each of the Fields/Expressions contained in the
child ListBox control. I have previously coded a solution to loop
through all of the windows in the Relationship WIndow in order to find
and repair any windows that have dropped off of the main window(happens
when you switch video card resolutions).
So you could easily save off the current dimesions and location of each
window to a file in order to restore the Relationship view at a later
time.
The code to play around with is in the Utilities MDB on my site in the
MISC section. THe code is minimal and was written for a NG poster whom
had lost a few windows off of the left edge of the Relationship window.

I'm not sure if this solves your issue or not Steve. I'd be glad to help
you put together a finished solution if you want.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:ng********************************@4ax.com...
On Fri, 16 Jan 2004 00:44:58 GMT, "Stephen Lebans"
<Fo****************************************@linval id.com> wrote:
What were you looking to do Steve?
I've played around with the windows that comprise the Relationship
window.
A couple of things. One thing, I could do with the tool Dimirti

mentioned, but I'm always hesitant to copy blobs around with internal meaning I don't unserstand. For instance, what kind of corruption would be introduced if the second database was missing a table that was in the original schema?

Basically, I want to back up the visual layout, so if I ever have to repair a database by importing everything into a new database, I can get back the old layout. A nice side benefit would be that one could save and restore
different layouts which would provide functionality similar to ADP database diagrams.


Nov 12 '05 #6
On Fri, 16 Jan 2004 03:25:34 GMT, "Stephen Lebans"
<Fo****************************************@linval id.com> wrote:
I know decoding the BLOB is the proper way to accomplish what you want
to do but I can suggest an alternative method.
Each of the Table objects in the Relationship window is comprised of two
windows. THe parent window is of the class OEcl and it contains a child
ListBox control window.
I just tried and you can use GetWIndowText to retrieve the Caption of
each of the table object windows which corresponds to the table's name.
You can also get at each of the Fields/Expressions contained in the
child ListBox control. I have previously coded a solution to loop
through all of the windows in the Relationship WIndow in order to find
and repair any windows that have dropped off of the main window(happens
when you switch video card resolutions).
So you could easily save off the current dimesions and location of each
window to a file in order to restore the Relationship view at a later
time.
The code to play around with is in the Utilities MDB on my site in the
MISC section. THe code is minimal and was written for a NG poster whom
had lost a few windows off of the left edge of the Relationship window.

I'm not sure if this solves your issue or not Steve. I'd be glad to help
you put together a finished solution if you want.


Actually, that sounds like it probably will handle my situation. If I know
what windows are there, and what their positions and sizes are, and if I have
a way to move/size the windows again later, then I just need to see if there's
something under DoCmd. to show and hide tables. If this works, I actually
think it would be more "proper" than decoding the blob.

I'll try it out, and see how far I get.
Nov 12 '05 #7
Steve I had a couple of hours to kill tonight so I put together a sample
MDB to Save or Restore the current layout fo the Relationship View
window. It requires a more functional GUI and better DAO interface and
error handling but it does work.

NEW - Jan 21/2004 A2KSave-RestoreRelationshipWindow.zip is an MDB
containing functions to Save and Restore the Relationships View Window.
Allows an unlimited number of different Relationship Window Views to be
saved.
http://www.lebans.com/saverelationshipview.htm
Here is the Access97 version:A97Save-RestoreRelationshipWindow.zip
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Steve Jorgensen" <no****@nospam.nospam> wrote in message
news:0m********************************@4ax.com...
On Fri, 16 Jan 2004 03:25:34 GMT, "Stephen Lebans"
<Fo****************************************@linval id.com> wrote:
I know decoding the BLOB is the proper way to accomplish what you wantto do but I can suggest an alternative method.
Each of the Table objects in the Relationship window is comprised of twowindows. THe parent window is of the class OEcl and it contains a childListBox control window.
I just tried and you can use GetWIndowText to retrieve the Caption of
each of the table object windows which corresponds to the table's name.You can also get at each of the Fields/Expressions contained in the
child ListBox control. I have previously coded a solution to loop
through all of the windows in the Relationship WIndow in order to findand repair any windows that have dropped off of the main window(happenswhen you switch video card resolutions).
So you could easily save off the current dimesions and location of eachwindow to a file in order to restore the Relationship view at a later
time.
The code to play around with is in the Utilities MDB on my site in theMISC section. THe code is minimal and was written for a NG poster whomhad lost a few windows off of the left edge of the Relationship window.
I'm not sure if this solves your issue or not Steve. I'd be glad to helpyou put together a finished solution if you want.
Actually, that sounds like it probably will handle my situation. If I

know what windows are there, and what their positions and sizes are, and if I have a way to move/size the windows again later, then I just need to see if there's something under DoCmd. to show and hide tables. If this works, I actually think it would be more "proper" than decoding the blob.

I'll try it out, and see how far I get.


Nov 12 '05 #8
On Wed, 21 Jan 2004 05:28:34 GMT, "Stephen Lebans"
<Fo****************************************@linval id.com> wrote:
Steve I had a couple of hours to kill tonight so I put together a sample
MDB to Save or Restore the current layout fo the Relationship View
window. It requires a more functional GUI and better DAO interface and
error handling but it does work.

NEW - Jan 21/2004 A2KSave-RestoreRelationshipWindow.zip is an MDB
containing functions to Save and Restore the Relationships View Window.
Allows an unlimited number of different Relationship Window Views to be
saved.
http://www.lebans.com/saverelationshipview.htm
Here is the Access97 version:A97Save-RestoreRelationshipWindow.zip


Great - thanks.

I hadn't had time to try to assemble one myself out of what you already had,
and now I won't need to. Yet again, you have made Access a better product
than is was when Microsoft gave it to us (assuming your code works, and I
think I'm safe in assuming that).

Hopefully, I'll have time to try this out tomorrow.
Nov 12 '05 #9

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...
2
by: Deano | last post by:
Just had a minor mishap which has meant starting a new database and importing all objects. I did have the option to import relationships ticked but these have not come over. The prospect of...
1
by: Brian | last post by:
Hello - I would like to examine the contents of a dataset at runtime to check that a query is returning the right data. I have set a breakpoint at the appropriate spot, but I am unsure as to...
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...
0
by: Bob | last post by:
I have Access 2003. When I look at the relationships of my tables, it looks correct, with the various 1 to many relationships, and 1 to 1, indicated with a line between keys. When I try to "Print...
1
desklamp
by: desklamp | last post by:
Access 2003 on Win2K The tables involved: an IP address table, tblIP, where basic IP address information is stored: IP, WHOIS, reverse DNS name, etc. an event IP table, tblIPEvent, where...
1
by: Robert | last post by:
If the goal is to take a 1-dimensional package of text and produce a tree data structure that is easy to understand and manipulate, and then write C/C++ code that works with that tree - does...
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...
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: 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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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.