How to Use SaveAsText and LoadFromText

Source: Internet
Author: User
In access, the application object has two undisclosed methods, one of which is SaveAsText and the other is LoadFromText. I remember that shortly after I first learned Access, when I was studying an analysis tool of the FMS, I found that it would always generate some temporary files and analyze these temporary files, it is similar to the format of the Form file in VB, so

In access, the application object has two undisclosed methods, one of which is Save As Text, and the other is Load From Text. I remember that shortly after I first learned Access, when I was studying an analysis tool of the FMS, I found that it would always generate some temporary files and analyze these temporary files, it is similar to the format of the Form file in VB, so

In access, the application object has two undisclosed methods, one of which is Save As Text, and the other is Load From Text. I remember that shortly after I first learned Access, when I was studying an analysis tool of the FMS, I found that it would always generate some temporary files and analyze these temporary files, it is found that it is similar to the format of the Form file in VB, so it is estimated that Microsoft can convert the form of Access to the text format, and provide a reverse conversion method. So I found my deep interest and then found these two methods.

Although Microsoft has some other relatively useful but undisclosed attributes, I spent the most time on these two methods, because they do have practical value, so let's talk about my usage experience over the years.

These two methods are not necessarily supported in later Access versions, so I do not recommend them. However, if some functions are implemented using them, they can save a lot of time, in some cases, I still use it. At least the existing ACCESS version supports this method. If you can implement the same function through the normal Access method, I suggest you use the public method of Microsoft. Remember!

Purpose 1:

Use application. saveastext acForm, "My form", and "c: test.txt" export the entire form to a text file, package it, and send it to your friends so that they can use the application again. loadfromtext acForm, "My form", "c: test.txt", and then import it back. You can compress, package, and transfer data.

Purpose 2:

You can save the form to a text file and store the text file to an OLE field. In this way, the interface and code of the entire form can be saved to the ACCESS data table, this method is very useful for compiling the code library manager. During use, you can also instantly restore text files to a form, allowing users to instantly preview the effects of this technique.

Purpose 3:

Save the form to a file and use regular expressions to analyze the code. You can analyze the syntax, code structure, syntax errors, Word Count statistics, and so on, you can refer to an Access analysis tool provided by FMS. It has some functions. If you spend half a year doing so, there should be no major problems. Remember to let me try the source code :)

Purpose 4:

In general, we need to replace the name or content of an attribute in the form globally. We need to modify them one by one, but we cannot replace them globally like in the code, export the form to a text file, replace it globally, and export it back.

Purpose 5:

Simplified and simplified conversion: Generally, the title, prompt text, and default value of the control cannot be converted after simplified conversion, after the conversion, an ACTIVEX control cannot be found or OLE error occurs when the corresponding environment is opened. After the form or other objects are converted to a text file, a simplified conversion is performed, after converting the corresponding character set, font name, simplified section name, CRC verification code, and so on, export back to the corresponding Access object to complete the conversion of the entire Access program, for more information about the program effects, see General Program for simplified conversion. Remember that the simplified version is generally 134, and the traditional version is 136.

Once you open the English language, you will know. I advise that if you want to do the same function, you 'd better not do it. If you want to use it, you will get it. Otherwise, you will be able to cut off my financial path. I will give it to you by 20%, after two years, I will accumulate 100 yuan and send it to you again :)

Purpose 6:

Although manual conversions are required between Chinese and English, it has saved a lot of time. However, it still requires some skills to use formal expressions to correctly distinguish titles, text prompts, and message boxes.

Purpose 7: Change the default properties of the control.

In addition to modifying the default properties of the control in the design status, modifying the content of a text file can also achieve the effect of modifying the default properties of the control. After the form or report is exported to a text file, all forms, control components, and default control attributes are displayed in the text file. You can modify the settings of the default attributes in the text file to achieve the goal.

What is the default attribute? For example, if you download a program from abroad and add controls to the form, the control font is always Serif, and the new form control in the simplified Chinese environment has a font of "", the font of The New Form Control in the traditional Chinese environment is "new notice", which is caused by the default attribute of the control.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.