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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Close form after another has been opened?

Status
Not open for further replies.

ChrisHaynes

Technical User
Mar 9, 2006
80
GB
Hi, I have a command button on a form (frmHome) which opens a form (frmHardware). Wot code do I use after
Code:
docmd.openform "frmHardware" to then close the original form (frmHome)

I have tried

Code:
DoCmd.Close acForm "frmHome"

but this doesn't seem to work?

Any ideas??
Your help would be greatly appreciated.

Chris.
 
Perhaps with comma ?
DoCmd.Close acForm, "frmHome"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
And this ?
DoCmd.Close acForm, Me.Name

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I tried that earlier, but because the new form has been opened, it closes that form instead.

Thanks for the quick replies PHV, do you have any other ideas??

Chris.

 
I have it working now, I was putting the code in the wrong place. Thanks for the help PHV.

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top