tag:blogger.com,1999:blog-7176045.post5174024800680202916..comments2008-04-04T13:05:27.896+04:00Comments on Alex & Access: ActiveX control eventsAlex Dybenkohttp://www.blogger.com/profile/16954512620659022712noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-7176045.post-47467842941059333542008-04-04T13:05:00.000+04:002008-04-04T13:05:00.000+04:002008-04-04T13:05:00.000+04:00Thanks for update! Here one more link on this tech...Thanks for update! Here one more link on this technique from FMS:<BR/>http://www.fmsinc.com/free/newtips/access/accesstip1.aspAlex Dybenkohttp://www.blogger.com/profile/16954512620659022712noreply@blogger.comtag:blogger.com,1999:blog-7176045.post-32274187182331566142008-04-04T04:30:00.000+04:002008-04-04T04:30:00.000+04:002008-04-04T04:30:00.000+04:00Hi Alex,I think there is some other general logic....Hi Alex,<BR/><BR/>I think there is some other general logic.<BR/>While we're embedding some ActiveX on form, access creates UserControl object, that contains our ActiceX one.<BR/>Very similar to embedding Form Object in Subform Control ...<BR/>(Note that SubformControl has different properties and events then Form Object ;-)<BR/><BR/>So we can see the events defined only for that common "usercontrol" and not for exact object we just embedded in it (ActiveX).<BR/><BR/>The way you have suggested is right.<BR/><BR/>But sometimes we need something else.<BR/>For example let's embed TreeView control (CommonControl ActiveX).<BR/><BR/>While we want IntelliSense in VBE we should make something like this:<BR/><BR/>'form/class module level declaration:<BR/>Dim WithEvents tv1 as TreeView<BR/>' ^^^^^^^^^^<BR/><BR/>Private Sub Form_Open(...)<BR/> Set tv1 = Me.MyTreeViewCOntrol1.Object<BR/>' ^^^^^^<BR/>End Sub<BR/><BR/>and now, in any procedure body in that form module (class module), we can get VBE IntelliSense while calling tv properties and methods (just typing dot after variable) or event procedures (by choosing right one in top-rigth combo, as you're suggesting)<BR/><BR/>king regards<BR/>KNAnonymousnoreply@blogger.com