S
Sam D
Hi and thanks for you help,
(Also posted to .modulescoding but has not yet appeared in my news reader)
I need to execute a procedure within another form from a procedure in a
module when the name of the procedure is generated using a string. I thought
Application.Run would do the job, however it generates runtime error 2517
(meaning it cannot find the procedure). The procedures can be run directly,
but not using Application.Run.
Is there another command that will solve my problem?
Code fragment follows...
'does this control require its AfterUpdate event to be executed
If .Controls(rs("ControlName")).Tag = "SU" Then
'run the controls AfterUpdate event procedure
'SAM these procedures must be public (not great but does the
job).
'Forms![Print Reports].cbo1_AfterUpdate <= THIS WORKS FINE
Application.Run "Forms![Print Reports]." & rs("ControlName") &
"_AfterUpdate" <= GENERATES ERROR 2517
End If
Regards,
Sam
(Also posted to .modulescoding but has not yet appeared in my news reader)
I need to execute a procedure within another form from a procedure in a
module when the name of the procedure is generated using a string. I thought
Application.Run would do the job, however it generates runtime error 2517
(meaning it cannot find the procedure). The procedures can be run directly,
but not using Application.Run.
Is there another command that will solve my problem?
Code fragment follows...
'does this control require its AfterUpdate event to be executed
If .Controls(rs("ControlName")).Tag = "SU" Then
'run the controls AfterUpdate event procedure
'SAM these procedures must be public (not great but does the
job).
'Forms![Print Reports].cbo1_AfterUpdate <= THIS WORKS FINE
Application.Run "Forms![Print Reports]." & rs("ControlName") &
"_AfterUpdate" <= GENERATES ERROR 2517
End If
Regards,
Sam