Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / May 2008

Tip: Looking for answers? Try searching our database.

Closing a Form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jim - 28 May 2008 21:28 GMT
I am creating an application where I want Form A to call Form B, then have
Form A close.  Does anyone know how to do this?  Thank you.
Klatuu - 28 May 2008 22:26 GMT
'Open Form B
   Docmd.OpenForm "FormB"
'Close Form A
   Docmd.Close acForm, Me.Name, acSaveNo
Signature

Dave Hargis, Microsoft Access MVP

> I am creating an application where I want Form A to call Form B, then have
> Form A close.  Does anyone know how to do this?  Thank you.
Jim - 29 May 2008 13:52 GMT
When I tried this, I received an error 2585 (This action can't be carried out
while processing a form or report event).  Any other ideas?  Thanks.

> 'Open Form B
>     Docmd.OpenForm "FormB"
[quoted text clipped - 3 lines]
> > I am creating an application where I want Form A to call Form B, then have
> > Form A close.  Does anyone know how to do this?  Thank you.
Klatuu - 29 May 2008 15:15 GMT
Where are you trying to execute this code?
Try reversing the order to:

   Docmd.Close acForm, Me.Name, acSaveNo
   Docmd.OpenForm "FormB"

Signature

Dave Hargis, Microsoft Access MVP

> When I tried this, I received an error 2585 (This action can't be carried out
> while processing a form or report event).  Any other ideas?  Thanks.
[quoted text clipped - 6 lines]
> > > I am creating an application where I want Form A to call Form B, then have
> > > Form A close.  Does anyone know how to do this?  Thank you.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.