close form on click event

C

carly

I am sort of new to the VBA language and I am stuck on
something. I created a button that on a form that when
clicked will return the user to the switchboard. I also
want the current form called "add new employee - Union
addresses" to close upon that same click. Is there
anyway that I can do this? Any help is appreciated, and
if it is an obvious answer, please clue me in! I am
confused. Here is the code that I have so far:

Private Sub cmdReturntoSwitchboard_Click()
DoCmd.OpenForm "frm Switchboard"
Exit_cmdReturntoSwitchboard_Click:
End Sub

Thanks
 

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