By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,635 Members | 913 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,635 IT Pros & Developers. It's quick & easy.

VIEW Relationships Using VBA

P: n/a
Hi,

I'd like to have a couple of buttons on my form so I can quickly access
some Access (97) features:

A) The relationships window;
B) Tools - Analyze - Documenter (for relationships).

Anyone know how either of these can be done?

Thanks,
-------
LoopyNZ
-------

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi.

You can use the RunCommand and the appropriate constants in Access 97 and
subsequent versions to open the Relationships window and the Documentor:

RunCommand acCmdRelationships

RunCommand acCmdDocumenter

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Any human can read my reply E-mail address and should alter it so that a
message will be forwarded to me. Spammers are free to use my UNALTERED
reply E-mail address. I will *never* get those messages!)
"LoopyNZ" <Lo*****@NOguruSPPAM.net.nz> wrote in message
news:41**********************@news.newsgroups.ws.. .
Hi,

I'd like to have a couple of buttons on my form so I can quickly access
some Access (97) features:

A) The relationships window;
B) Tools - Analyze - Documenter (for relationships).

Anyone know how either of these can be done?

Thanks,
-------
LoopyNZ
-------

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #2

P: n/a
Thanks Gunny, that was very straightforward and I'm sure it will come in
handy in future.

A step on from that, is there any way I can code which element(s) I want
to include in the documenter and then go straight to print/preview? I
see that RunCommand <command> doesn't take any other arguments, so I'm
not optimistic... Unless anyone knows of another way to call the
documenter?

-------
LoopyNZ
-------

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3

P: n/a
No. There aren't any parameters for the RunCommand for you to customize the
behavior of the Documentor. The only way that I can think of to automate
the Documentor would be to use SendKeys, but I don't recommend this because
it's not entirely reliable. The SendKeys commands will be executed on the
window that has the focus and that focus can change unpredictably.

I don't know of another way of calling the Documentor, but you can extract
the information you need from the same place as the Documentor does if you
wanted to. You'll need to do some pre-planning first, and if your database
objects don't change between your pre-planning and the running of this
report, then you could run the Documentor beforehand, then create a query
based upon the table that Access makes for the Documentor. The query would
extract only the information you need, and then you could use that query for
a report that you create in the pre-planning stage, but run whenever the
user needs to view and print it.

In Access 2000 and later, when the Documentor runs, the table named
doc_tblObjects will be created in the ACWZUSRT.MDT file. I can't remember
the file name of the Access 97 Wizard that contains the Documentor's
information, but if you have Access 97, please post back and I'll find it.

The default directory for this wizard is:

"C:\Documents and Settings\UserID\Application Data\Microsoft\Access"

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Any human can read my reply E-mail address and should alter it so that a
message will be forwarded to me. Spammers are free to use my UNALTERED
reply E-mail address. I will *never* get those messages!)
"LoopyNZ" <Lo*****@NOguruSPPAM.net.nz> wrote in message
news:41**********************@news.newsgroups.ws.. .
Thanks Gunny, that was very straightforward and I'm sure it will come in
handy in future.

A step on from that, is there any way I can code which element(s) I want
to include in the documenter and then go straight to print/preview? I
see that RunCommand <command> doesn't take any other arguments, so I'm
not optimistic... Unless anyone knows of another way to call the
documenter?

-------
LoopyNZ
-------

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.