accessNator
Registered User.
- Local time
- Today, 14:46
- Joined
- Oct 17, 2008
- Messages
- 132
To continue on from the last thread the syntax is slighlty out. To save a form as a text file you need
Then to retrieve the form useCode:Application.SaveAsText acForm, "YourFormNameHere", "C:\Path\Filename.txt"
Remember to delete the offending form name before loading the new one from text. It is also worthwhile performing a compact and repair, then exiting Access. Re open the mdb and load the form from text file.Code:Application.LoadFromText acForm, "NewFormNameHere", "C:\Path\Filename.txt"
If you have to provide documentation for your application you can use this technique to create text files that contain all the information about your forms. Then should anyone modify your form at any point or it becomes corrupt you can restore it from the text file. You can be really clever and create a support database that would be similar to the MSysObjects table that contains a list of all your objects and store the contents of the text files into a memo field.
David
Thanks to both (Air_Cooled_Nut and David) of you. This helped me today!!!