<gh********@yahoo.com> wrote in message
news:11**********************@p10g2000cwp.googlegr oups.com...
Hi,
Can anyone recommend a piece of VBA code I could attach to a button in
a MS Form form that will close the current form and bring the
switchboard to foreground. I'm trying to integrate a form of buttons
into the way the switchboard gets used.
Best wishes,
George Hadley
gh********@yahoo.com
George,
You don't really need a "close form" button. Hide your switchboard form
when your
target form opens and unhide it when it closes. In the target form's open
event:
Forms("frmSwitchboard").Visible = False
In the form's close event:
Forms("frmSwitchboard").Visible = True
It's a bit clunky in that it will cause an error if the switchboard form
isn't loaded but it should work otherwise.
Keith.
www.keithwilby.com