Distance from the previous three log has been a long time, and today finally completed a relatively complete automated report building process
Based on the company data privacy principles, the model will not be put on the internet, simply say the background:
The features that this access implements include:
1) for the Department as a whole to build a database of staff basic information, including from the various systems to obtain employee information, such as Zhang San, a system called San Zhang, a system called Sazhang, a system called Sun Zhang. This information is aggregated, there is a departmental share disk, including this access, are directly linked to the total Access table, so that when a new employee comes, only need to update one access, all the rest of the data can be automatically linked to update.
2) Use saved import to save the data import function, and write Vba/marco to update the data automatically:
* Delete source data: Two ways to write Marco, automatically run a deleted query that has been written, or delete a record directly with Marco.
* Import data: Use runsavedimportexport (savedimportexportname) to perform data import;
3) In terms of query, we mainly set two
* Delete Query
* Select query
It involves two customization statements, such as IIF (judgment, Truepart,falsepart), and for multiple options, switch is much simpler than using IIF to nest, such as switch (judging 1, output, judging 2, output). However, switch can not directly use the Else statement, so if the judgment is not established, will output a blank value, this needs to be noted.
After using IIF and switch, plus the lookup function of query implementation, access is basically able to complete most of the data processing that Excel does in the report. Basically 80%-90% data processing can be done here. ^ ^
4) Introduction of this operation:
1) Download the source data and place it in the appropriate location to replace the original data source
Note: This can also be outside the chain. However, according to the practice, when the amount of data is relatively large, delete the data with delete query, and then import the data, the speed is much larger than the outside chain. And the above operations can be run with a program.
2) Open access, run Marco, delete the relevant data, and update the data
3) run through a series of queries after the final query, after exporting to Excel, import the formula has been written in Excel, refresh.
The writing is more concise. Only as a study note.
Subsequent:
1) Form making, Macro and VBA writing, improve the degree of automation
2) Writing Instructions
Another DoCmd
http://msdn.microsoft.com/zh-tw/library/office/ff192740 (v=office.14). aspx
Specific reference to this
|
Name |
Description |
|
AddMenu (English) |
the AddMenu method carries out the AddMenu action in Visual Basic. |
|
ApplyFilter (English) |
the ApplyFilter Method carries out the , ApplyFilter action in Visual Basic. |
|
Beep (English) |
the Beep method carries out t He Beep action in Visual Basic. |
|
browseto (English) |
the BrowseTo method Performs the BrowseTo action in Visual Basic. |
|
cancelevent (English) |
the CancelEvent Method carries out of the CancelEvent action in Visual Basic. |
Access Application Notes < Four >-a complete automated report building process