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

Tip: Looking for answers? Try searching our database.

Lost All Forms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JamesJ - 17 Apr 2007 22:02 GMT
Has this happened to anyone else?
Designing a form and all of a sudden all form objects are gone in Access
2007.
Access asked to save the design of a form and that was the last I saw
of 10 objects in this db. Showing tables and related views find no more
forms in my
db.

James
Noreply - 17 Apr 2007 22:22 GMT
Did you try to compress and see if they come back?

> Has this happened to anyone else?
> Designing a form and all of a sudden all form objects are gone in Access
[quoted text clipped - 5 lines]
>
> James
JamesJ - 17 Apr 2007 22:38 GMT
Tried that. Have no idea what happened here.

> Did you try to compress and see if they come back?
>
[quoted text clipped - 7 lines]
>>
>> James
Damian S - 18 Apr 2007 03:04 GMT
Hope you have a backup!!  If not, you will next time.

D.

> Tried that. Have no idea what happened here.
>
[quoted text clipped - 9 lines]
> >>
> >> James
JamesJ - 18 Apr 2007 11:11 GMT
I backed it up a few minutes before. But with ac 2007 I have to
walk on eggshells... corrupted forms and the like. Seems all I need
to do is change the BackColor of a form object and the form becomes
corrupt.

James

> Hope you have a backup!!  If not, you will next time.
>
[quoted text clipped - 15 lines]
>> >>
>> >> James
Allen Browne - 18 Apr 2007 03:42 GMT
James, I guess you are trying to find out whether the forms are somewhere
under the surface, even if you can't see them.

Try creating this query:
   SELECT MSysObjects.Name
   FROM MSysObjects
   WHERE MSysObjects.Type = -32768
   ORDER BY MSysObjects.Type, MSysObjects.Name;

Alternative approach: open the Immediate Window (Ctrl+G), and enter:
   ? CurrentProject.AllForms.Count
If there's more than zero, you can try:
   ? CurrentProject.AllForms(0).Name

Any luck?

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.

> Has this happened to anyone else?
> Designing a form and all of a sudden all form objects are gone in Access
[quoted text clipped - 5 lines]
>
> James
JamesJ - 18 Apr 2007 11:16 GMT
Yes. The query returned the all form names.
Now what?

James

> James, I guess you are trying to find out whether the forms are somewhere
> under the surface, even if you can't see them.
[quoted text clipped - 21 lines]
>>
>> James
Allen Browne - 18 Apr 2007 12:59 GMT
Excellent. They are still present.

That means they may be marked as hidden objects, or the navigation bar may
be filtered to exclude those objects.

Go to:
   Office Button | Access Options | Current Database | Navigation Options.
Under Categories, choose Object Type.
Make sure the Forms box is checked (on the right.)
At the bottom of the dialog, check the boxes for Show Hidden Objects and
Show System Objects.

If you can now see your forms in the Navigation Pane, right-click and choose
View Properties. Make sure the Hidden box is not checked.

Since you can see the names of your forms, you can also try opening one like
this:
1. Press Ctrl+G to open the Immediate window.

2. Enter:
   DoCmd.OpenForm "Form1"
substituting your form name for Form1.
If it opens, that may reassure you they are okay.

Let us know how you go.

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.

> Yes. The query returned the all form names.
> Now what?
[quoted text clipped - 26 lines]
>>>
>>> James
JamesJ - 18 Apr 2007 20:01 GMT
No good. Navigation Pane still not showing Forms except for the
one form that I saved the design changes to when this happenned.

James

> Excellent. They are still present.
>
[quoted text clipped - 52 lines]
>>>>
>>>> James
Allen Browne - 19 Apr 2007 03:06 GMT
Can you open them programmatically, i.e. using the DoCmd.OpenForm?

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.

> No good. Navigation Pane still not showing Forms except for the
> one form that I saved the design changes to when this happenned.
[quoted text clipped - 56 lines]
>>>>> more forms in my
>>>>> db.
JamesJ - 19 Apr 2007 10:51 GMT
No. Putting the DoCmd in the Onclick of a command button
tells me 'Module not Found'. After opening the db I continue
to get error messages of form names being misspelled or don't exist.

James

> Can you open them programmatically, i.e. using the DoCmd.OpenForm?
>
[quoted text clipped - 58 lines]
>>>>>> more forms in my
>>>>>> db.
Allen Browne - 19 Apr 2007 12:17 GMT
This doesn't sound simple. There could be multiple issues to solve.

Your choices might be to revert to a backup, or get some professional help
to sort it out.

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.

> No. Putting the DoCmd in the Onclick of a command button
> tells me 'Module not Found'. After opening the db I continue
[quoted text clipped - 65 lines]
>>>>>>> more forms in my
>>>>>>> db.
JamesJ - 19 Apr 2007 22:07 GMT
> This doesn't sound simple. There could be multiple issues to solve.
>
[quoted text clipped - 70 lines]
>>>>>>>> more forms in my
>>>>>>>> db.
JamesJ - 19 Apr 2007 22:10 GMT
Already reverted to my backup. Just trying to figure out
how to avoid this in the future. Scary.
I ran the repair in Access 2007 setup before proceeding to my
backup. Maybe that will make a difference.

Thanks much for your time and effort.
James

> This doesn't sound simple. There could be multiple issues to solve.
>
[quoted text clipped - 70 lines]
>>>>>>>> more forms in my
>>>>>>>> db.
naendaz@gmail.com - 28 Apr 2007 05:30 GMT
James, are you attempting to open a 2003 DB in 2007?  If so this might
be your problem.  2007 DBs include new system tables (MSysxxxxxxxx
type table) specific to the Nav Pane.  Without valid entries in these
tables, there will be nothing shown on the Navigation Pane.

Because I've only been running 2007 for about 2 hours, I can't help
with a workaround yet!  Maybe once my enterprise databases that I work
on get upgraded I'll need to work on that one!

Cheers.

> Already reverted to my backup. Just trying to figure out
> how to avoid this in the future. Scary.
[quoted text clipped - 83 lines]
> >>>>>>>> more forms in my
> >>>>>>>> db.
mista.bert@gmail.com - 30 Apr 2007 02:45 GMT
The same thing just happened to me.  I was in the middle of designing
a form and module.  It asked me to save...I did...went back the the
forms selector, and poof.  Went over to Modules, and poof.

I just lost about 8 hours of work.  I'm thoroughly disgusted.  I've
never seen anything this drastic and unrecoverable happen in any
program.   I tried closing and reopening...tried exiting Access and
reopening...tried compact and repair...tried the query you mentioned,
which did list the missing forms...but I can't gain access to them or
to my modules.

This is dismal.

The only thing I can think of is that I had programatically initiated
a NewForm command, which was still sitting open.  I didn't know how it
worked; rather than creating the form behind the scenes, it had
actually displayed an empty for in design mode, and then stopped.
That's the form I was closing and about to discard, when everything
just...disappeared.

Unbelievable.  And I'm supposed to deliver an application using this
tool...?  I couldn't even trust this for tracking my CD collection!
Allen Browne - 30 Apr 2007 04:27 GMT
We can identify with the frustration at losing your work, but perhaps your
question goes beyond the immediate frustration to the longer term. Here's a
suggestion if you are genuinely asking, "How can I avoid this from happening
again?"

Firstly, there's just a slight chance that you may be able to find the
missing module by locating an odd name in this query:
   SELECT MSysObjects.Name
   FROM MSysObjects
   WHERE MSysObjects.Type = -32761
   ORDER BY MSysObjects.Name;
Sometimes you can identify a temp module there, and find your code again.
Probably not if you already compacted.

Anyway, suggestions on how you can use Access reliably.

Make sure Name AutoCorrect is off.
From main Access window:
   Tools | Options | General

Make sure Compile on Demand is off.
From VBA window:
   Tools | Options

Don't edit code in break mode. Just as you cannot go plugging more RAM chips
into your computer while it is running, you cannot go stuffing more code
into your module while the code is running.

I wasn't clear from your post whether you created a new form, or a new
instance of a form with the New keyword. Editing while an instance is open
would be inviting disaster.

Backup every few hours - typically 3 times a day (when you stop for lunch,
dinner, and sleep), without overwriting previous backups.

Compact *after* each backup. This leaves you the uncompacted backup in case
something goes wrong. (Doubly important in A2007.)

Decompile periodically - typically after the final compact at the end of
each day's heavy development, but sooner if there is any indication that
something is not right. Then compact again.

At the end of each day's development, copy the backup file to another
location (different computer, USB memory stick, ...), again without
overwriting previous backups.

Before any major change, copy the code out to Notepad, and you can easily go
back if it doesn't work out.

If something does go wrong, make a copy of the file before trying to fix it.
That way, you get multiple goes at solving the problem.

Maybe that all sounds rather basic, but it's just the voice of experience.
I've lost stuff in the past, but it's been years now since I've lost more
than a couple of hours worth of work.

Hope you're feeling less frustrated by the time you read this, and that it
doesn't come across as merely closing the gate after the horse escaped. It's
intended as the voice of experience, addressing your question of how you can
use Access as a reliable development tool.

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.

> The same thing just happened to me.  I was in the middle of designing
> a form and module.  It asked me to save...I did...went back the the
[quoted text clipped - 18 lines]
> Unbelievable.  And I'm supposed to deliver an application using this
> tool...?  I couldn't even trust this for tracking my CD collection!
 
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.