Access应用笔记<四>
距离之前的三篇日志已经很久啦,今天终于完成了一个比较完整的自动化报表搭建过程 基于公司数据保密原则,样板就不放到网上来了,简单说一下背景: 这次access实现的功能包括: 1)为部门整体搭建了一个员工基本资料数据库,里面包括从各个系统里获得的员工
距离之前的三篇日志已经很久啦,今天终于完成了一个比较完整的自动化报表搭建过程
基于公司数据保密原则,样板就不放到网上来了,简单说一下背景:
这次access实现的功能包括:
1)为部门整体搭建了一个员工基本资料数据库,里面包括从各个系统里获得的员工信息,如Zhang San,一个系统里叫San Zhang,一个系统叫sazhang,一个系统叫sun Zhang。这些信息汇总后,存在部门共享盘里,包括此次的Access,都是直接链接到这个总access表里,这样,有新员工来的时候,只需要更新一个access,其余所有数据都能实现自动链接更新。
2)利用saved import,保存固化数据导入功能,同时编写VBA/Marco进行数据自动更新:
*删除源数据:两个方法,编写Marco,自动运行已经编写好的删除查询,或直接用Marco删除记录。
*导入数据:用RunSavedImportExport(SavedImportExportName)可以执行数据导入;
3)在查询方面,主要设定两个
*删除查询
*选择查询
里面涉及两个自定义项语句,如IIF(判断,truepart,falsepart),而对于多重选择,用switch比用iif嵌套要简单得多,如switch(判断1,输出,判断2,输出)。不过switch不能直接用else语句,因此如果判断均不成立,会输出空白值,这点需要注意。
运用IIF和switch后,再加上查询实现的lookup功能,至此,access基本能完成excel做数据报表里要用的大部分数据处理。基本上80%-90%的数据处理就可以在这里来完成了^^
4)本次操作简介:
1)下载源数据,放到相应的位置,替换原有的数据源
注:这里也可以外链。但是根据实践,当数据量比较大的时候,用删除查询删除数据,然后再导入数据,速度远远大于外链。并且上述操作均可以用程序来运行。
2)打开access,运行Marco,删除相关的数据,并更新数据
3)运行经过一系列查询后的最终查询,导出到excel后,导入已经写好公式的excel里,刷新即可。
写得比较简练。仅作为学习笔记。
后续:
1)窗体制作,宏及VBA编写,提高自动化程度
2)编写说明
另外DoCmd
http://msdn.microsoft.com/zh-tw/library/office/ff192740(v=office.14).aspx
具体可参考与此
Name |
Description |
---|---|
AddMenu (英文) |
The AddMenu method carries out the AddMenu action in Visual Basic. |
ApplyFilter (英文) |
The ApplyFilter method carries out the ApplyFilter action in Visual Basic. |
Beep (英文) |
The Beep method carries out the Beep action in Visual Basic. |
BrowseTo (英文) |
The BrowseTo method performs the BrowseTo action in Visual Basic. |
CancelEvent (英文) |
The CancelEvent method carries out the CancelEvent action in Visual Basic. |

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

SQL IF statements are used to conditionally execute SQL statements, with the syntax as: IF (condition) THEN {statement} ELSE {statement} END IF;. The condition can be any valid SQL expression, and if the condition is true, execute the THEN clause; if the condition is false, execute the ELSE clause. IF statements can be nested, allowing for more complex conditional checks.

The advantage of multithreading is that it can improve performance and resource utilization, especially for processing large amounts of data or performing time-consuming operations. It allows multiple tasks to be performed simultaneously, improving efficiency. However, too many threads can lead to performance degradation, so you need to carefully select the number of threads based on the number of CPU cores and task characteristics. In addition, multi-threaded programming involves challenges such as deadlock and race conditions, which need to be solved using synchronization mechanisms, and requires solid knowledge of concurrent programming, weighing the pros and cons and using them with caution.

The main reasons why you cannot log in to MySQL as root are permission problems, configuration file errors, password inconsistent, socket file problems, or firewall interception. The solution includes: check whether the bind-address parameter in the configuration file is configured correctly. Check whether the root user permissions have been modified or deleted and reset. Verify that the password is accurate, including case and special characters. Check socket file permission settings and paths. Check that the firewall blocks connections to the MySQL server.

How to avoid the third-party interface returning 403 error in the Node environment. When calling the third-party website interface using Node.js, you sometimes encounter the problem of returning 403 error. �...

How to configure Zend in Apache? The steps to configure Zend Framework in an Apache Web Server are as follows: Install Zend Framework and extract it into the Web Server directory. Create a .htaccess file. Create the Zend application directory and add the index.php file. Configure the Zend application (application.ini). Restart the Apache Web server.

Methods to solve the cross-domain problem of Vue Axios include: Configuring the CORS header on the server side using the Axios proxy using JSONP using WebSocket using the CORS plug-in

Get ComponentVerify in EasyWechat5.5...

The key to PHPMyAdmin security defense strategy is: 1. Use the latest version of PHPMyAdmin and regularly update PHP and MySQL; 2. Strictly control access rights, use .htaccess or web server access control; 3. Enable strong password and two-factor authentication; 4. Back up the database regularly; 5. Carefully check the configuration files to avoid exposing sensitive information; 6. Use Web Application Firewall (WAF); 7. Carry out security audits. These measures can effectively reduce the security risks caused by PHPMyAdmin due to improper configuration, over-old version or environmental security risks, and ensure the security of the database.
