How to use Save as text and load from text

Source: Internet
Author: User
Tags character set ole

The Application object in Access has two non-public methods, one of which is save as text and the other is load from text. I remember just learning access soon, when the study of an analysis tool FMS, tracking found that it will always produce some temporary files, the temporary file analysis, found that it and VB in the form file format, so it is estimated that Microsoft can convert access to the form of text format, and provides a method of inverse phase conversion. So found a deep interest, and then found these two methods.

Although there are some other open properties of Microsoft, but I spend the most time on these two methods, because it does have useful value, so talk about the use of their experience over the years.

These two methods are not necessarily supported in later versions of Access. So I don't recommend it, but because there are some features that you can use to save a lot of time, in some cases I still use it, and at least the existing version of Access supports this approach. If the same functionality can be done in Access's normal way, I suggest you use Microsoft's open approach. Remember!

Use 1:

Using Application.saveastext acform, my form, c:test.txt exports the entire form to a text file, packages it to friends, and lets friends reuse Application.loadfromtext Acform, "My form", "C:test.txt" and then guide back. You can compress and package the transfer.

Use 2:

You can save a form to a text file, and then store the text file in an OLE field so that the entire form's interface and code can be saved to the Access data table, which is useful for writing the code library Manager. When used, you can also instantly restore a text file to a form that allows users to instantly preview the effect of this technique

Use 3:

Save the form to a file file, using regular expressions to analyze the code, you can analyze the syntax, code structure, syntax errors, word count and so on, you can refer to the FMS of an Access analysis tool, it has the function, you spend six months, do not have a big problem. Remember to let me try the source code OH:

Use 4:

The real global substitution, generally we need to replace the name of a property in the form or the content, need to be modified one after another, but not like the code in the global replacement, now export the form to a text file, in the text file for global replacement, completed and then back to the form.

Use 5:

Simplified conversion, Chinese-English conversion, general to the control title, prompt text, default value, etc. after the text simplified conversion does not really implement the simplified conversion, in the corresponding environment after the conversion of the ActiveX control can not find or OLE error, the form or other objects converted to a text file before the simplified conversion, And then convert the corresponding character set, font name, simplified corresponding name of the section, CRC check Code, and so on, and then back to access the corresponding object, you can complete the conversion of the entire Access program, the corresponding program effects can see my simplified conversion general procedures, remember that the simplified general is 134 traditional is 136.

You can speak English when you open it. I advise, if you want to do the same function, then you'd better not do it, with my on it, lest break my money, I commission 20% to you, and so on, after two years to 100 yuan, I once again remit to you:

Use 6:

Chinese-English conversion, although a small number of manual conversion, but has saved a lot of time, but how to use formal expressions to correctly distinguish which is the title, hint text, message box also requires some skills.

Purpose 7: Change the default property of a control

In addition to the default properties of the control that we modify in the design state, the effect of modifying the default property of a control can be achieved by using the content that modifies the text file, and when the form or report is exported to a text file, all forms, controls, and default control properties are reflected in the text file. You can accomplish this by modifying the settings for the default properties in this text file.

What is the default property? For example, you download a foreign program, why add controls to the form, the control font is always serif, and in the Simplified Chinese environment new form controls, fonts are "XXFarEastFont-Arial", in the traditional Chinese environment new form control, fonts are "new fine body", is caused by the default property of this 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.