Bob's solution, while correct, isn't always necessary. You can simply call the procedure in the form's class module.
E.g. Formname=frmTest, Buttonname=btnOk_Click
Your code would then be
Call Form_frmTest.btnOk_Click
The form doesn't have to be open to use the code. However, if the code you're using needs the form to be open, you might want to be sure it is open before you call the procedure.
Randall J Weers
Membership Vice President
Pacific NorthWest Access Developers Group
http://www.pnwadg.org