[AccessD] Problem implementing checkbox control class module

Bill Benson bensonforums at gmail.com
Wed Aug 26 09:37:46 CDT 2015


At form load, I am running the below routine.

Myck is dimensioned at the form module level. I don't even think it shold
matter whether I do that or dim it at the procedure level, but it has been
making no difference.

The click event in my class module where I have dimmed ck publicly
withevents is not firing.

I am using a collection to hold the Myck.ck; I would think keeping that in
memory by scoping it to the form module is enough - but even declaring it
publicly has not helped me synch the class module with the control being
clicked.

Help?

'Standard Module
Public gColcolCk As Collection
'Form Module
Dim Myck As clsck

Private Sub LoadReportTabs()
    Set gColcolCk = New Collection
    Set Myck = New clsck
    Set Myck.ck = ckUseThis
    gColcolCk.Add Myck
End Sub
'Class clsCk
Option Compare Database
Option Explicit
Public WithEvents ck As CheckBox
Private Sub Ck_Click()
    msgbox "Clicked"
End Sub


More information about the AccessD mailing list