473,569 Members | 2,991 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2082
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*********@hot mail.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.c om:
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.c om...
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************ *************** *************@l invalid.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.c om...
On Fri, 16 Jan 2004 00:44:58 GMT, "Stephen Lebans"
<Fo************ *************** *************@l invalid.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************ *************** *************@l invalid.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-RestoreRelation shipWindow.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-RestoreRelation shipWindow.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.c om...
On Fri, 16 Jan 2004 03:25:34 GMT, "Stephen Lebans"
<Fo************ *************** *************@l invalid.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************ *************** *************@l invalid.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-RestoreRelation shipWindow.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-RestoreRelation shipWindow.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
3002
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 wizard, I opened the table relationship view and noticed that all the relationships are missing. Is this supposed to happen? If so, why? I've noticed...
2
4121
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 front end with forms / queries and links to the tables in the back end. From the Relationships window I selected File / Print Relationships. The...
2
1296
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 recreating the contents of the relationship window is freaking me out. Any ideas? Thanks
1
1108
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 the best way to get a glimpse of the number of rows in the data set, and the actual data. Thanks for any help. Brian
45
3364
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 relationship spaghetti....tables/queries all overthe place with lots of relationship lines between here and there. After that first app I didn't...
0
1139
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 Relationships" the connection lines only appear for tables within the first 3 columns. No lines appear to tables in the 4th and higher columns. ...
1
2465
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 event specific data is stored: IP, event number, port, protocol, direction, etc. a third report table, tblReport, where I track the source IP,...
1
2021
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 lex/yacc suit that purpose - i.e. kind of like a tree-manufacturing C library? Or is it for producing a compiler/interpreter the internals of which a new...
5
2100
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 display changes fine. But if I add or remove a table from any one of them, strange things happen. For example: start with a fresh copy of the...
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7618
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7679
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6287
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5223
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3657
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2117
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1228
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.