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 |
#1
|
|||
|
|||
Importing objects in new db fails partly
I have the following peculiar problem. When I import my database objects
into a new database there are some forms which are not imported complete. The import completes without errors. Those 'problem' forms are visible in the database window, and the VBA code is also present. Only the actual form object is missing. It is not possible to open the form, even not in the design mode. When I import those forms again there are no problems and the forms can be opened without problem. Exporting the forms from the source database (with an add-in / VBA code) causes no problem. I use Access 2003 SP3. Does this sounds familiar to anyone? |
#2
|
|||
|
|||
Importing objects in new db fails partly
I don't have any specific info on this, so it would be good to hear if
someone else does. You're not using Visual Source Safe? That has problems with A2003 SP3. If this applies to specific form(s) but generally not others, there's a fairly good chance that the form is partially corrupt. You might try rescuing the original database (i.e. the one you are copying from): 1. Make a backup copy of the MDB in case something goes wrong. 2. Make sure you have te Name AutoCorrect boxes unchecked under: Tools | Options | General | Name AutoCorrect Explanation of why: http://allenbrowne.com/bug-03.html 3. Compact the database: Tools | Database Utilities | Compact/Repair 4. Decompile 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" 5. Open the form's module, and copy all the code out to Notepad. Close the module. In form design view, set the form's Has Module property to No. Answer Yes to the confirmation dialog about losing the code. Save the form. 6. Compact the database again. 7. Export the suspect form to a text file, using the undocumented SaveAsText. Something like this: SaveAsText acForm, "Form1", "C:\Form1.txt" 8. Delete the suspect form. 9. Compact again. 10. Get Access to recreate the supsect from from the text file: LoadFromText acForm, "Form1", "C:\Form1.txt" 11. Open the form's module, and paste in the text you saved at step 5. 12. Still in the code window, choose Compile from the Debug menu. Now see if the form will import into your other database correctly. -- 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. "Goos van Beek" wrote in message ... I have the following peculiar problem. When I import my database objects into a new database there are some forms which are not imported complete. The import completes without errors. Those 'problem' forms are visible in the database window, and the VBA code is also present. Only the actual form object is missing. It is not possible to open the form, even not in the design mode. When I import those forms again there are no problems and the forms can be opened without problem. Exporting the forms from the source database (with an add-in / VBA code) causes no problem. I use Access 2003 SP3. Does this sounds familiar to anyone? |
#3
|
|||
|
|||
Importing objects in new db fails partly
Hi Allen.
Thanks for your effort! For a few weeks I get memory errors and import errors as described while importing objects in a new database. Its a fairly large FE database, it migth have somthing to do with it, I don't know. These are the steps I followed until now: - Database was already compacted and repaired. - I already tried the decompile switch without result. - On this particular machine was VSS 6.0 installed. Uninstalling did not solve the problem. - I did copy the error forms without code, but some of those new forms also caused an error. - I *always* uncheck the Name AutoCorrect, . In all my applications I use an 'InitApplication' script which sets/creates all nessecery settings,properties and permissions. This script also turns off the Name AutoCorrect. After all objects are inmported, and thats where it goes wrong! * Unchecking Name AutoCorrect in the newly created db before importing the objects from the source db was the solution for my problems! Thanks again! Goos van Beek. "Allen Browne" schreef in bericht ... I don't have any specific info on this, so it would be good to hear if someone else does. You're not using Visual Source Safe? That has problems with A2003 SP3. If this applies to specific form(s) but generally not others, there's a fairly good chance that the form is partially corrupt. You might try rescuing the original database (i.e. the one you are copying from): 1. Make a backup copy of the MDB in case something goes wrong. 2. Make sure you have te Name AutoCorrect boxes unchecked under: Tools | Options | General | Name AutoCorrect Explanation of why: http://allenbrowne.com/bug-03.html 3. Compact the database: Tools | Database Utilities | Compact/Repair 4. Decompile 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" 5. Open the form's module, and copy all the code out to Notepad. Close the module. In form design view, set the form's Has Module property to No. Answer Yes to the confirmation dialog about losing the code. Save the form. 6. Compact the database again. 7. Export the suspect form to a text file, using the undocumented SaveAsText. Something like this: SaveAsText acForm, "Form1", "C:\Form1.txt" 8. Delete the suspect form. 9. Compact again. 10. Get Access to recreate the supsect from from the text file: LoadFromText acForm, "Form1", "C:\Form1.txt" 11. Open the form's module, and paste in the text you saved at step 5. 12. Still in the code window, choose Compile from the Debug menu. Now see if the form will import into your other database correctly. -- 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. "Goos van Beek" wrote in message ... I have the following peculiar problem. When I import my database objects into a new database there are some forms which are not imported complete. The import completes without errors. Those 'problem' forms are visible in the database window, and the VBA code is also present. Only the actual form object is missing. It is not possible to open the form, even not in the design mode. When I import those forms again there are no problems and the forms can be opened without problem. Exporting the forms from the source database (with an add-in / VBA code) causes no problem. I use Access 2003 SP3. Does this sounds familiar to anyone? |
#4
|
|||
|
|||
Importing objects in new db fails partly
Thanks for posting the solution.
Looks like another one goes down to Name AutoCorrupt. -- 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. "Goos van Beek" wrote in message ... Hi Allen. Thanks for your effort! For a few weeks I get memory errors and import errors as described while importing objects in a new database. Its a fairly large FE database, it migth have somthing to do with it, I don't know. These are the steps I followed until now: - Database was already compacted and repaired. - I already tried the decompile switch without result. - On this particular machine was VSS 6.0 installed. Uninstalling did not solve the problem. - I did copy the error forms without code, but some of those new forms also caused an error. - I *always* uncheck the Name AutoCorrect, . In all my applications I use an 'InitApplication' script which sets/creates all nessecery settings,properties and permissions. This script also turns off the Name AutoCorrect. After all objects are inmported, and thats where it goes wrong! * Unchecking Name AutoCorrect in the newly created db before importing the objects from the source db was the solution for my problems! Thanks again! Goos van Beek. "Allen Browne" schreef in bericht ... I don't have any specific info on this, so it would be good to hear if someone else does. You're not using Visual Source Safe? That has problems with A2003 SP3. If this applies to specific form(s) but generally not others, there's a fairly good chance that the form is partially corrupt. You might try rescuing the original database (i.e. the one you are copying from): 1. Make a backup copy of the MDB in case something goes wrong. 2. Make sure you have te Name AutoCorrect boxes unchecked under: Tools | Options | General | Name AutoCorrect Explanation of why: http://allenbrowne.com/bug-03.html 3. Compact the database: Tools | Database Utilities | Compact/Repair 4. Decompile 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" 5. Open the form's module, and copy all the code out to Notepad. Close the module. In form design view, set the form's Has Module property to No. Answer Yes to the confirmation dialog about losing the code. Save the form. 6. Compact the database again. 7. Export the suspect form to a text file, using the undocumented SaveAsText. Something like this: SaveAsText acForm, "Form1", "C:\Form1.txt" 8. Delete the suspect form. 9. Compact again. 10. Get Access to recreate the supsect from from the text file: LoadFromText acForm, "Form1", "C:\Form1.txt" 11. Open the form's module, and paste in the text you saved at step 5. 12. Still in the code window, choose Compile from the Debug menu. Now see if the form will import into your other database correctly. "Goos van Beek" wrote in message ... I have the following peculiar problem. When I import my database objects into a new database there are some forms which are not imported complete. The import completes without errors. Those 'problem' forms are visible in the database window, and the VBA code is also present. Only the actual form object is missing. It is not possible to open the form, even not in the design mode. When I import those forms again there are no problems and the forms can be opened without problem. Exporting the forms from the source database (with an add-in / VBA code) causes no problem. I use Access 2003 SP3. Does this sounds familiar to anyone? |
#5
|
|||
|
|||
Importing objects in new db fails partly
The least I could do, thanks again :-)
"Allen Browne" schreef in bericht ... Thanks for posting the solution. Looks like another one goes down to Name AutoCorrupt. -- 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. "Goos van Beek" wrote in message ... Hi Allen. Thanks for your effort! For a few weeks I get memory errors and import errors as described while importing objects in a new database. Its a fairly large FE database, it migth have somthing to do with it, I don't know. These are the steps I followed until now: - Database was already compacted and repaired. - I already tried the decompile switch without result. - On this particular machine was VSS 6.0 installed. Uninstalling did not solve the problem. - I did copy the error forms without code, but some of those new forms also caused an error. - I *always* uncheck the Name AutoCorrect, . In all my applications I use an 'InitApplication' script which sets/creates all nessecery settings,properties and permissions. This script also turns off the Name AutoCorrect. After all objects are inmported, and thats where it goes wrong! * Unchecking Name AutoCorrect in the newly created db before importing the objects from the source db was the solution for my problems! Thanks again! Goos van Beek. "Allen Browne" schreef in bericht ... I don't have any specific info on this, so it would be good to hear if someone else does. You're not using Visual Source Safe? That has problems with A2003 SP3. If this applies to specific form(s) but generally not others, there's a fairly good chance that the form is partially corrupt. You might try rescuing the original database (i.e. the one you are copying from): 1. Make a backup copy of the MDB in case something goes wrong. 2. Make sure you have te Name AutoCorrect boxes unchecked under: Tools | Options | General | Name AutoCorrect Explanation of why: http://allenbrowne.com/bug-03.html 3. Compact the database: Tools | Database Utilities | Compact/Repair 4. Decompile 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" 5. Open the form's module, and copy all the code out to Notepad. Close the module. In form design view, set the form's Has Module property to No. Answer Yes to the confirmation dialog about losing the code. Save the form. 6. Compact the database again. 7. Export the suspect form to a text file, using the undocumented SaveAsText. Something like this: SaveAsText acForm, "Form1", "C:\Form1.txt" 8. Delete the suspect form. 9. Compact again. 10. Get Access to recreate the supsect from from the text file: LoadFromText acForm, "Form1", "C:\Form1.txt" 11. Open the form's module, and paste in the text you saved at step 5. 12. Still in the code window, choose Compile from the Debug menu. Now see if the form will import into your other database correctly. "Goos van Beek" wrote in message ... I have the following peculiar problem. When I import my database objects into a new database there are some forms which are not imported complete. The import completes without errors. Those 'problem' forms are visible in the database window, and the VBA code is also present. Only the actual form object is missing. It is not possible to open the form, even not in the design mode. When I import those forms again there are no problems and the forms can be opened without problem. Exporting the forms from the source database (with an add-in / VBA code) causes no problem. I use Access 2003 SP3. Does this sounds familiar to anyone? |
Thread Tools | |
Display Modes | |
|
|