jwcolby
jwcolby at colbyconsulting.com
Mon Mar 9 13:50:39 CDT 2009
The entire mInit() should read as follows:
Function mInit(lctlTxt As TextBox)
Set mctlTxt = lctlTxt
mctlTxt.BeforeUpdate = cstrEvProc
mctlTxt.AfterUpdate = cstrEvProc
mctlTxt.OnGotFocus = cstrEvProc
mctlTxt.OnLostFocus = cstrEvProc
mclsCtlLbl.mInit lctlTxt
End Function
We pass in lctlTxt to the function so it is available inside of mInit() for use.
John W. Colby
www.ColbyConsulting.com
Klos, Susan wrote:
> I realize that I am really far behind, but you said to ask questions
> when we need help.
>
>
>
> Here is my question:
>
> I don't understand these instructions:
>
> * In Class_Terminate add the following code:
>
>
>
> Private Sub Class_Terminate()
>
> Set mctlTxt = Nothing
>
> Set mclsCtlLbl = Nothing
>
> End Sub
>
>
>
> This cleans up the label class when clsCtlCbo class closes.
>
>
>
> * At the bottom of mInit() add the following code:
>
>
>
> mclsCtlLbl.mInit lctlTxt
>
>
>
> Since mclsCtlLbl was initialized in the Initialize event of the class it
> is ready to use when we get to mInit. We simply call the mInit method
> of mclsCtlLbl and pass in the combo control passed in to clsCtlCbo.
>
>
>
> We have not done anything with Txt in this class and when I try to
> compile the code this error pops us for these two lines of code
>
> mctlTxt = and for lctlTxt I get "Variable not defined"
>
>
>
> When I comment out those two lines of code it compiles fine. What have
> I missed
>
>
>
> Susan Klos
>
> Senior Database Analyst
>
> Florida Department of Education
>
> Evaluation and Reporting Office
>
> Phone: 850.245.0708
>
> email: susan.klos at fldoe.org <mailto:susan.klos at fldoe.org>
>
>
>
>
>
> The Florida Department of Education is a proud partner of Cover Florida Health Care. For more information and a list of the plans available in your area, please visit http://www.coverfloridahealthcare.com/