At the invitation of the Yellow Sea (
http://www.accessqq.com, suddenly have to write some things, suddenly see what I don't know, studying Access for so many years, I feel that it is doing corporate applications, there is no high-profile skill, also There is no skill, I have to race my brain, and I will be squeezed out. I hope to be able to deal with the Yellow Sea and everyone :)
In Access object, there are two unapproved methods, one is saveastext, and the other is loadFromText. I remember that I have just learned ACCESS, when I study the FMS analysis tool, track discovery that it will always produce some temporary files. For these temporary file analysis, it is found to be similar to the format of form files in VB, so it is estimated that Microsoft can convert Access's form into a text format and provide an inverse conversion method. So I found deep interest, and later found these two methods. Although Microsoft has some other unapplicaled attributes, I still spend the time in these two ways, because it does have the value of use, so I have said that I have experienced the experience over the years. These two methods are not supported in the subsequent Access versions, so I don't recommend everyone, but because some functions can be implemented, save more time, so in some cases, I still Will use it, at least existing Access versions support this method. If the same feature you can implement through the ACCESS normal method, I suggest you use Microsoft's publication methods. Remember!
Uses 1:
Use Application.saveastext Acform, "My Form", "C: / Test.txt" to export the entire form to a text file, send it to a friend, let your friends use Application.LoadFromText Acform, "My Form "," c: /test.txt "is again retracted. You can compress packaging transfer.
Uses 2: You can save the form to a text file, then store the text file to the OLE field, so the interface of the entire form can be saved to the Access data table, this method is very useful to write the code library manager. In use, you can also restore text files to a form, allowing users to preview the effect of this tip.
Uses 3: Save the form to a file file, analyze the code using the regular expression, analyze the grammar, code structure, grammatical error, word count statistics, etc. You can refer to an ACCESS tool for FMS, it has Function, you spend a half year, there should be no big problem. Remember to try the source code :) Use 4: Real global replacement, usually we need to replace the name or content of a property in the form in the overall, need to modify one by one, and unable to implement global replacement in the code, now the window The body is exported to the text file and conducts a global replacement in the text file, and then retrans back the form after completion. Uses 5: Difficultover, China-British conversion, generally simply transform the control title, prompt text, default value, etc., can not really realize the transformation, and the ActiveX control will appear in the corresponding environment after conversion. Can't find or convert the form or other object to a text file, then turnover again, then convert the corresponding character set, font name, and the sminy corresponding name of the section, CRC check code, etc. Guide the Access corresponding object, you can complete the conversion of the Access program. The corresponding program effect can be found in the transformation of the generic program, remember that the Simplified is generally 134 Traditional Chinese. You are open. I advise, if you want to do the same function, then don't do it, you have to use me, you will have to break my fingers, I will give you 20%, I have to accumulate 100 yuan after two years. Return to you again :) Use 6: Chinese and English conversion, although there is still a small amount of manual conversion, but has saved a lot of time, but how to use a formal expression to see which is title, prompt text, message box still need Some techniques. Upu 7: Change the default properties of the control In addition to our default properties of the control, the content of the modified text file can also achieve the effect of modifying the default properties of the control, after the form or report is exported to the text file, all Forms, control parts, and default control properties are reflected in text files, and can achieve the purpose by modifying the settings of the default properties in this text file. What is the default attribute? For example, you download a program from abroad, why add controls in the form, the control font is always serif, and the newly created form control in the Simplified Chinese environment, the font is "Song", new construction in the traditional Chinese environment The form control, the font is "new sophisticated body", because the purpose of this control caused by the purpose 8: Implement the effect of automatically created the form template, exporting a form of basic functions to text files Save, to the time you need, directly import it back, you may generate a form that has a common function, you don't need to pass from the head, do one automate, make a rich form function code library, let users Select a variety of different features, then select the desired code from these code libraries to create a text file according to the form of the form text file, and then automatically combine a perfect form by this text file, do not require users to program, As long as you select a field, select Form Functions, Select Style, Select Templates to entries, query forms, analytical forms, report statistics, etc., write programs become assembled. If you haven't worried, you will develop a special component. Note that replication functions and code in text files, replicates controls and code in the form of automatic programming, with greater elasticity and plasticity.
Uses 9: If there is a picture or OLE object in the form or report, you will contain their binaries in the exported text file. Use the regular expression or other method to extract this part of the content to the corresponding image file, You can implement the image saving files for the form and report (Access does not support the image of the image control directly to the file) 10: Implementing the Access Form and Report to the VB program, now there are some professional procedures to provide this Features, I think that the basic idea should be in this way, export forms and reports to file files, then analyze it from the VB form file, then modify the text file to accommodate the needs of the VB form. I don't have enough time to do this :), of course, if you can make a tool, you may also do a tool, implement the VB's form back to the Access program, after all VB resources and rich skills to Access To make great use of value use 11: One-time modification of the font name font size or other properties used in the Access object, the font and other properties of the form table can be changed. Use 12: View the GUID of the form and control, and use it to make the corresponding use use 13: Modify the form and report about the printer information, why the form's print settings cannot be saved, why open the report will prompt to the original default printer does not exist Whether to use the current printer, etc., this information is actually stored in the form and report, open the text file, what is clear, through this feature, many powerful features, everyone plays. Use 14: If you want to get the form and control, you can know many usage 15: Create some new controls, such as combo boxes, list boxes, etc., can be created directly inside, and More useful, some of the registered information (License), if the original form is available, but you don't have License, you will have an error, saying that you don't have any copyright, but if you export the form to the text file , Return back to a new form, Access gives you a lot of people, but this method can make a taught :), although I have tried many times, but I am very unused. :), everyone knows, I usually use genuine :) Use 16:
You can use the above method to export all objects of all Access to files for backup, and then you want to restore which one is restored, although this method has its advantages, however, the entire MDB backup may be more actual :)
Uses 17:
Can be used for version control, I don't know if you have used SourceSafe in Access, I have a short time, discovery that its check-in check out is the use of the method I said above, and saved in SourceSafe is the text format of each object. . If you are interested, you can write a similar version control tool. I expect to write it in 2008. If you have already written it before that year, it is best to send me the source code, otherwise I accuse you steal me. idea:)
Upu 18: In addition to the forms and reports, there are almost most objects, such as queries, views, stored procedures, relationships, macros, modules, etc. can be exported, you can use all kinds of purposes, here Not detailed, if you have a unique discovery, please tell me, but please note that the table is not exported :)
Also tell you, starting at the 2002 (XP) version, Microsoft starts checking the CRC check, so sometimes there may be some problems when the object is returned. Maybe Microsoft already knows that someone is abused :)
In a hurry, the statement is unlocked or wrong, please let a horse :)