VBA to close form and bring switchboard to foreground

G

ghadley_00

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
(e-mail address removed)
 
A

Alex Dybenko

Hi,
something like this:

docmd.close acform, screen.activeform.name
docmd.openform "frmSwitchboard"
 
A

Allen Browne

After the 2 lines Alex suggested, you might want to add:
Forms("frmSwitchboard").SetFocus

That should handle the case where the switchboard is already open in the
background.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top