How to view relationship window using Access VBA?

Per the following image - how may I force the Relationship window screen appear for someone by clicking a button using VBA coding only?
relation-window.JPG
LVL 1
stephenlecomptejrAsked:
Who is Participating?
 
mbizupConnect With a Mentor Commented:
Try this in your button's Click Event:

DoCmd.RunCommand acCmdRelationships
0
 
Jeffrey CoachmanConnect With a Mentor MIS LiasonCommented:
<No points wanted>
Note that there is no easy way to make the relationship window "Read Only"
So any user opening this screen will have full access to do whatever they want (either intentionally or by accident)
So you might want to somehow restrict access to this screen to only a developers (or other high level users)

FWIW you can also do this (after you run mbizup's code) to open a Report of the relationships.
    DoCmd.RunCommand acCmdPrintRelationships

JeffCoachman

0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Connect With a Mentor Database ArchitectCommented:
As far as printing the Relationships window, there are a couple of other ways:


http://www.aadconsulting.com/legacyaddins.html
Scroll to the bottom to "Vizual Relations
The smart way to print Access relationships! Vizual Relations 97 or Vizual Relations 2000/2002."
This does a MUCH better job of printing relationships.  I have this AddIn.

And this is cool also:
http://www.lebans.com/windowtobitmap.htm

mx
0
 
stephenlecomptejrAuthor Commented:
THANK YOU
0
 
mbizupCommented:
Glad to help out :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.