Open a another form and Close this one

B

Bob Vance

I am trying to open a form "frmRemarks"
and close the form that my control button is on
Private Sub cmdDCDShortcut_Click()
DoCmd.OpenForm "frmRemarks"
DoCmd.Close acForm, Me.Name

End Sub
 
B

Bob Vance

oops sorry got it,
Private Sub cmdDCDShortcut_Click()

DoCmd.Close acForm, Me.Name
DoCmd.OpenForm "frmRemarks"
End Sub
 
K

Ken Snell \(MVP\)

It's better to reverse the order of the steps:

Private Sub cmdDCDShortcut_Click()
DoCmd.OpenForm "frmRemarks"
DoCmd.Close acForm, Me.Name
End Sub

--

Ken Snell
<MS ACCESS MVP>



Bob Vance said:
oops sorry got it,
Private Sub cmdDCDShortcut_Click()

DoCmd.Close acForm, Me.Name
DoCmd.OpenForm "frmRemarks"
End Sub
 

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