My guess: you're talking about MS Access. If I'm wrong, please correct me.
What I should do in such a case: write a separate module (either a VBA module or an Access macro) and call that from the click event of both command buttons. The code contained in a form can use local variables defined in the form (which aren't available in the other form), so a direct call from one form to another isn't possible.
Kees
I have a formA with command button named command15, I also have another formB with command button called command39.
On click event on command39 i want to call command15, knowing that they are on different form
Pls can any body help

Chowhound
Comic Vine
GameFAQs
GameSpot
Giant Bomb
TechRepublic