The code that is associated with a form is only executable when the form itself is open. Generally, you can only execute the code with a button or event on the form. Therefore, the code is NOT available to be executed from within the VBA envireonment. The only way to do that would be to make sure the procedure you want/need to run is Public (not private) and then (I believe) the code is something like: Forms!frmWithCode.FunctionName(AnyParmsNeeded). Of course you will need to put your own names in place of "rmWithCode" and FunctionName. Plus, if any parameter are required, put the correct parameters in place of AnyParmsNeeded.
Hope this helps,
Vic
|