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 / March 2007

Tip: Looking for answers? Try searching our database.

Access 2003 Form Will Not Open

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ursino1 - 02 Mar 2007 18:42 GMT
Of serveral forms, only 1 will not open.  I can see the VB code, but I can
not open the form.  The form seems to be locked.  

What happend: I got an out of memory message when openning another form.  So
I closed everything.  When I reopened it, this happened.

This has happened before, normaly I just copy everything in a new database
and recreate the form, but in this case, I've lost a great deal of work.  How
can I fix this?

I need a miracle from the kindness of strangers whom I've always counted on
=) Please please please please
Allen Browne - 03 Mar 2007 07:10 GMT
No promises, but some things to try.

First thing is to make a backup copy of the mdb, so you get multiple
attempts to rescue the bad form.

1. If you can view the code, copy it out to clipboard, paste it into
Notepad, and save it as a text file.

2. Open the Immeidate Window (Ctrl+G), and enter:
   SaveAsText acForm, "Form1", "C:\Form1.txt"
replacing Form1 with the name of your form.
If the form really is bad, this probably won't work.
If it does work, delete the form from this copy of the database, compact the
database:
   Tools | Database Utilities | Compact/Repair
or in Access 2007:
   Office Button | Manage | Compact/Repair
Then try importing it with:
   LoadFromText acForm, "Form1", "C:\Form1.txt"

3. If the form cannot be rescued like that, uncheck the boxes under:
   Tools | Options | General | Name AutoCorrect
In Access 2007, it's:
   Office Button | Access Options | Current Database | Name AutoCorrect
Explanation of why:
   http://allenbrowne.com/bug-03.html
Then compact the database.

4. If the form is still bad at this point, decompile the database by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
   "c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
       "c:\MyPath\MyDatabase.mdb"
Then open Access (holding down the Shift key if you have any startup code),
and compact again.

5. If you're still stuck, ask Access to recreate the database, import
everything else except the bad form, and then recreate the form. It's the
steps for the first symptom in this article:
   http://allenbrowne.com/ser-47.html
If you have an old backup that has this form, you can then import it from
the old backup. Since you have the code associated with the form, it's not
too hard to position the controls on the form, and you can paste in the code
instead of having to re-write it.

HTH

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Of serveral forms, only 1 will not open.  I can see the VB code, but I can
> not open the form.  The form seems to be locked.
[quoted text clipped - 11 lines]
> on
> =) Please please please please
 
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.