If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
Lost All Forms
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 "Allen Browne" wrote in message ... Can you open them programmatically, i.e. using the DoCmd.OpenForm? -- 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. "JamesJ" wrote in message ... No good. Navigation Pane still not showing Forms except for the one form that I saved the design changes to when this happenned. James "Allen Browne" wrote in message ... 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. "JamesJ" wrote in message ... Yes. The query returned the all form names. Now what? James "Allen Browne" wrote in message ... 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? "JamesJ" wrote in message ... 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. |
#12
|
|||
|
|||
Lost All Forms
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. -- 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. "JamesJ" wrote in message ... 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 "Allen Browne" wrote in message ... Can you open them programmatically, i.e. using the DoCmd.OpenForm? "JamesJ" wrote in message ... No good. Navigation Pane still not showing Forms except for the one form that I saved the design changes to when this happenned. James "Allen Browne" wrote in message ... 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. "JamesJ" wrote in message ... Yes. The query returned the all form names. Now what? James "Allen Browne" wrote in message ... 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? "JamesJ" wrote in message ... 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. |
#13
|
|||
|
|||
Lost All Forms
"Allen Browne" wrote in message ... 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. -- 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. "JamesJ" wrote in message ... 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 "Allen Browne" wrote in message ... Can you open them programmatically, i.e. using the DoCmd.OpenForm? "JamesJ" wrote in message ... No good. Navigation Pane still not showing Forms except for the one form that I saved the design changes to when this happenned. James "Allen Browne" wrote in message ... 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. "JamesJ" wrote in message ... Yes. The query returned the all form names. Now what? James "Allen Browne" wrote in message ... 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? "JamesJ" wrote in message ... 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. |
#14
|
|||
|
|||
Lost All Forms
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 "Allen Browne" wrote in message ... 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. -- 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. "JamesJ" wrote in message ... 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 "Allen Browne" wrote in message ... Can you open them programmatically, i.e. using the DoCmd.OpenForm? "JamesJ" wrote in message ... No good. Navigation Pane still not showing Forms except for the one form that I saved the design changes to when this happenned. James "Allen Browne" wrote in message ... 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. "JamesJ" wrote in message ... Yes. The query returned the all form names. Now what? James "Allen Browne" wrote in message ... 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? "JamesJ" wrote in message ... 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. |
#15
|
|||
|
|||
Lost All Forms
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. On Apr 20, 9:10 am, "JamesJ" wrote: Already reverted to my backup. Just trying to figure out how to avoid this in the future. Scary. I ran the repair inAccess2007 setup before proceeding to my backup. Maybe that will make a difference. Thanks much for your time and effort. James "Allen Browne" wrote in message ... 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. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips forAccessusers -http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "JamesJ" wrote in message ... 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 "Allen Browne" wrote in message ... Can you open them programmatically, i.e. using the DoCmd.OpenForm? "JamesJ" wrote in message ... Nogood.NavigationPanestill not showing Forms except for the one form that I saved the design changes to when this happenned. James "Allen Browne" wrote in message .. . Excellent. They are still present. That means they may be marked as hiddenobjects, or thenavigationbar may be filtered to exclude thoseobjects. Go to: Office Button |AccessOptions | 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 HiddenObjects and Show SystemObjects. If you can now see your forms in theNavigationPane, 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. "JamesJ" wrote in message . .. Yes. The query returned the all form names. Now what? James "Allen Browne" wrote in message ... 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? "JamesJ" wrote in message l... Has this happened to anyone else? Designing a form and all of a sudden all formobjectsare gone in Access2007. Accessasked to save the design of a form and that was the last I saw of 10objectsin this db. Showing tables and related views findno more forms in my db. |
#16
|
|||
|
|||
Lost All Forms
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! |
#17
|
|||
|
|||
Lost All Forms
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. -- 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. wrote in message ups.com... 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! |
|
Thread Tools | |
Display Modes | |
|
|