Yeah, I am bumping up against limitations, both in COM and in Access, or a
combination of both.
I was able to make the Toolbar1_ButtonClick event public, and it is
callable. But as I said, it wants a toolbar button passed. The code turns
out to be:
Call Form_frmClipping.Toolbar1_ButtonClick(btn)
The problem is the form that the call is being made from doesn't know that
there is a toolbar in the project. I can't create a toolbar button object on
the form that doesn't have a toolbar, I'm trying,
I guess that the toolbar is Private to the form that it sits on. And I
don't know how to make it public.
One solution would be to put a hidden toolbar on the calling form, just so
that I could create a button object, but that just seems so stupid.
If you have any other ideas, or if there is something I am obviously doing
wrong, please tell me. Right now, Gerhard
"Gerhard" <ge****************@inch.comwrote in message
news:Y7t3h.2650$MO6.1029@trndny06...
Thanks MG, I see where you are going with this.
There are some remaining problems though. The Toolbar1_ButtonClick event
takes a button as object being passed. I am working on creating that, but
I
am having problems.
Once instantiated the key or index property would have to be set on that
button object to indicate which button has been pressed or is being
simulated as being pressed.
Let me see how far I can get with this, the documentation is so so,
Gerhard
"MGFoster" <me@privacy.comwrote in message
news:0%*****************@newsread4.news.pas.earthl ink.net...
Gerhard wrote:
I have an MS Access app with multiple forms. One of the forms has a
Toolbar
(MsComctlLib.Toolbar) and it works as advertised. I handle the
buttons
in
the Toolbar1_ButtonClick event.
I would like to be able to control the toolbar from another form.
>
Forms!frmClipping!Toolbar1.Buttons(2).Clicked = True
>
does not work. Does anybody have any ideas how to do this?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm assuming that you want to run the toolbar's Click event. Instead of
trying to manipulate the command button on the toolbar make the event
procedure Public and call the event procedure from the other form:
Call Forms!frmClipping.Toolbar1_ButtonClick()
--
MGFoster:::mgf00 <atearthlink <decimal-pointnet
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBRU0MSYechKqOuFEgEQKArACcC7QMg7eAkbsUEbtsISOl9C 7wufEAnAoI
5ypfxNqFkuE9M+sP2Vi0Mq2K
=VBer
-----END PGP SIGNATURE-----