Command Buttons in subform

B

Bruce D.

I've created a command button in a subform. The button is suppose to open
another form. This works correctly if the button is placed outside the
subform. But if I place it within the subform and click on it nothing
happens. Any ideas on how to code around this??
Thanks for any help or ideas...
 
A

Andi Mayer

I've created a command button in a subform. The button is suppose to open
another form. This works correctly if the button is placed outside the
subform. But if I place it within the subform and click on it nothing
happens. Any ideas on how to code around this??
Thanks for any help or ideas...
is the allow edits on the subform allowed?
 
D

doyapore

Bruce,
You could try building a macro which opens a subform. Look up the DoCmd sets of commands. You could either hook up the form-opening macro to your button or write an On_Click event code involving the DoCmd.OpenForm "frmTest1" where "frmTest1" is the name of the form you wish to open.
Incidentally, both the methods are one and the same. When you convert the form-opening macro to VBA code, you will find that it would translate to exactly DoCmd.OpenForm "<the name of your form which you want to open>".
 
E

E George

Bruce D. said:
I've created a command button in a subform. The button is suppose to open
another form. This works correctly if the button is placed outside the
subform. But if I place it within the subform and click on it nothing
happens. Any ideas on how to code around this??
Thanks for any help or ideas...



What is the exact code that is supposed to run when you click the button? BTW do the words "Event Procedure" appear in the "On Click" Property of this command button?
 
Top