If I understand correctly in the OnClick event of a Command Button you can place the code you want to execute. So based upon the code you place, that will execute when you click the Command Button.
If thats not what you need, please explain a bit further.
Hope this helps,
Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"
Please vote an answer helpful if they helped. Please mark an answer(s) as an answer when your question is being answered.