Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open and closing form problem 2

Status
Not open for further replies.

jpl458

Technical User
Sep 30, 2009
337
US
I have a form that has a close button and a print button, that were made with the button wizard.. i can only get to this form from another form, say form A. If I close "B" then i return to form A. But after I print the form "B" and hit the close button I go to the ACCESS window with the lists of queries, etc. After I print, just want to hit CLOSE and go back to Form A

Thanks in advance

jpl
 
Code:
Private Sub cmdClose_Click()
    DoCmd.OpenForm "formA"
    DoCmd.Close acForm, "formB"
End Sub

Randy
 
You may try this:
Code:
Private Sub cmdClose_Click()
' your actual code here
Forms![form A].SetFocus
End Sub

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top