ms access - Call method from another form -


i have navigation form 2 subforms looks this:

enter image description here

when button in subform clicked, call method subform b. method defined this:

public sub mymethod()     debug.print "mymethod called" end sub 

i tried using forms!subformb.mymethod error database cannot find referenced form 'subformb'. referring this page, tried forms!navigationform!subformb.mymethod database cannot find referenced form 'navigationform'. know how properly?

thank you.

function , sub procedures defined in class module of form considered private form. if want sub can called several different forms move sub "regular" vba module (i.e., 1 created when choose insert > module menu bar in vba editor) , sure declare public.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -