How do I declare a reference to an ActiveX "ListView" Control in Access VBA? -


i'm using access 2003.

in "references" (tools > references > browse...), i've added in "microsoft windows common controls 6.0 (sp6)" (c:\windows\system32\mscomctl.ocx) , i've created/inserted instance of control "microsoft listview control 6.0 (sp6)" on form , given control name "mylistview".

i wanted decorate mylistview custom methods i've created class ("decoratedlistview") contains member field ("lvw").

i want 'lvw' point/reference mylistview, don't know reference type use in declaration. importantly, want capture lvw's columnclick event.

i've tried:

public withevents lvw object public withevents lvw control public withevents lvw mscomctllib.listview.2 

and none works when

set lvw = myform.mylistview

can explain how should create reference (lvw) existing object (mylistview)?

access can't handle sort of thing.

the onclick should available on myform though, can't see in event tab in properties. activex controls complicated that. instead, go code , choose mylistview in combobox on top left. you'll find extended activex events in combobox on top right. 1 of them columnclick.

not sure full intentions are, if want sort of mimic isolated decoratedlistview class create special form includes listview control , use subform other forms. can refer listview parent form other subform control object. parent specific code can run listview subform checking me.parent.name object parent form. can call subform's listview events changing default private sub public sub.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -