This is carrying on from thread705-307496 . It's kind of mutated into a different question so i thought I'd start a new thread.
If I set a variable(test) in a module to be a Control on an open form, when I check the debug window locals, I expand the variable and there amongst everything else is its AfterUpdate method.
Try as I might, I cannot reference this method in the form:
test.AfterUpdate
Where
controlName = "Cost Type"
Set test = Form_frmFindCourses(controlName)
I know you can successfully reference the AfterUpdate event of a control from a procedure in a module because this:
Form_frmFindCourses.Cost_Type_AfterUpdate
works fine.
So why can't you reference it the other way? I'd love to use the working method but I need to call different AfterUpdate methods depending on the controlName.
I know this can be solved using a Select Case statement but I can't understand why I can't do it this way when it all the evidence says it should!
Anyone know why?
Cheers,
Pete
If I set a variable(test) in a module to be a Control on an open form, when I check the debug window locals, I expand the variable and there amongst everything else is its AfterUpdate method.
Try as I might, I cannot reference this method in the form:
test.AfterUpdate
Where
controlName = "Cost Type"
Set test = Form_frmFindCourses(controlName)
I know you can successfully reference the AfterUpdate event of a control from a procedure in a module because this:
Form_frmFindCourses.Cost_Type_AfterUpdate
works fine.
So why can't you reference it the other way? I'd love to use the working method but I need to call different AfterUpdate methods depending on the controlName.
I know this can be solved using a Select Case statement but I can't understand why I can't do it this way when it all the evidence says it should!
Anyone know why?
Cheers,
Pete