Command Buttons Open Subforms

ewong1

Eric Wong
Local time
Today, 14:13
Joined
Dec 4, 2004
Messages
96
I am attempting to create a form "frmROrder" with two command buttons, daily detail, and annual detail. Is there a way for me to set frmROrder up so that If I click on cmdDaily it opens subform frmROrderDaily or if I click on cmdAnnual, it opens subform frmROrderAnnual? Thanks for your help!
 
You could just make the subform you want visible.

In the click even of cmdDaily
frmROrderDaily.visble= true
frmROrderAnnual.visble = false

In the click even of cmdAnnual
frmROrderAnnual.visble = True
frmROrderDaily.visble= false
 
Yes. Change the 'SourceObject' property of the subform control in the button's OnClick event. Having the two subforms might even lend itself to using a Toggle button.
 

Users who are viewing this thread

Back
Top Bottom