[AccessD] Ribbon

Bill Benson bensonforums at gmail.com
Fri Jan 28 14:36:11 CST 2022


My method of writing the code into every form using VBE coding is way way
way easier than all this, since those forms code was already done.

On Fri, Jan 28, 2022 at 10:32 AM John Colby <jwcolby at gmail.com> wrote:

> Sorry, I didn't add myself to the To: of the previous message.  I am
> answering this way because the previous thread was too long to go through
> any more.
>
> It absolutely is possible to quickly and easily use a class in a form's
> CBF.
>
> 1) Dim the class variable in the header.
> 2) In the form's OnOpen instantiate the class and sign to the variable you
> just created.  Pass in a pointer to whatever control you want to manage to
> that class instance.  In that class, sink whatever events you want to
> respond to.
>
> What this does is remove the event sinking from the CBF of the form and
> places said event sinking into the class.  Inside of that class (which I
> call a "wrapper" class for the gawd awful music they make ;) do whatever
> you wanted that control to do.  Turn on and off the toolbar or whatever ...
>
> Copy and paste the code you just created in this CBF into every other
> form's CBF.
>
> I haven't been following this thread closely.  I am just responding really
> to the comment "classes are for controls, not forms.  NOT the case.  They
> are for both.
>
> seadvisors.com <http://www.databaseadvisors.com>
>


More information about the AccessD mailing list