I have an application in which if users double-click on a text box, a "Zoom Box" form pops up to allow the entry of multiple lines or a paragraph of text. When the zoom-box form closes, the original control which was double-clicked is updated. This all works just fine.
However, because the text is updated using VBA, the After Update event of the control does not fire, and I need to have it run. In my module to open the zoom-box (which is openened in dialog mode), I have this after the form is closed:
CMD = "Forms![" & Screen.ActiveForm.Name & "]." & Screen.ActiveControl.Name & "_AfterUpdate"
which for example results in the variable CMD being set (correctly) to:
"Forms![Edit_Job_Working_Conditions_Detail].WorkEnvironment_AfterUpdate"
Now, if I do Run (CMD), access gives an error that it cannot find the procedure, but if I put
Forms![Edit_Job_Working_Conditions_Detail].WorkEnvironment_AfterUpdate
as an explicit command to test - in the same place as the Run - it works fine and runs the procedure as it should.
Because the zoombox procedure is called from many forms and many controls, it needs to be variable.
Any thoughts on why the explicit command works, but using Run does not?
Thanks
John