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 Programming / February 2006

Tip: Looking for answers? Try searching our database.

Closing a form and returning to original error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Justin Hess - 28 Feb 2006 14:08 GMT
Hi,
Basically I have 5 forms open, FormB and RostYA1 to RostYA4. Now when I
reach RostYA4 I need to close all forms except FormB. When using docmd.close
acform, name, acsaveno it closes all the forms I want except RostYA4 (Which
I'm currently in)
I have tried to use Forms!FormB.SetFocus and DoCmd.OpenForm "FormB" etc...
but I still get an error saying "This action can't be carried out while
processing a form or report event"
AAAAHHHHH.... driving me insane... after all, all I want to do is close that
form and return to the original one - "FormB"
Please Help :(
rhann - 28 Feb 2006 14:29 GMT
after all of the forms have closed you can reopen the form, again, just befor
you have shut the last bit of code

> Hi,
> Basically I have 5 forms open, FormB and RostYA1 to RostYA4. Now when I
[quoted text clipped - 7 lines]
> form and return to the original one - "FormB"
> Please Help :(
rhann - 28 Feb 2006 14:34 GMT
docmd.close
docmd.openform = "formname"
or along those lines

> Hi,
> Basically I have 5 forms open, FormB and RostYA1 to RostYA4. Now when I
[quoted text clipped - 7 lines]
> form and return to the original one - "FormB"
> Please Help :(
Justin Hess - 28 Feb 2006 15:08 GMT
I have tried everything but to no avail...Do you mean the following?

DoCmd.Close acForm, "RostYA3"
DoCmd.Close acForm, "RostYA2"
DoCmd.Close acForm, "RostYA"
DoCmd.OpenForm "FormB"
DoCmd.Close acForm, "RostYA4"

Still gives me the same error...
   
   

> docmd.close
> docmd.openform = "formname"
[quoted text clipped - 11 lines]
> > form and return to the original one - "FormB"
> > Please Help :(
albycindy - 28 Feb 2006 15:27 GMT
Hi Justin

I'm a relative novice but thought I'd put in my 2c worth!

Have you tried putting the DoCmd.Open line of your code after all the close
ones? eg,
DoCmd.Close acForm, "RostYA3"
DoCmd.Close acForm, "RostYA2"
DoCmd.Close acForm, "RostYA"
DoCmd.Close acForm, "RostYA4"
DoCmd.OpenForm "FormB", acNormal, etc...

If you need it to open to the record you had open last, I know there is some
way to do it but not off the top of my head. There's heaps of info on that in
this forum if you search.

HTH

Cindy

> I have tried everything but to no avail...Do you mean the following?
>
[quoted text clipped - 23 lines]
> > > form and return to the original one - "FormB"
> > > Please Help :(
 
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.