Access入门教程 15.4 创建宏
讲了宏的设计窗口,现在该亲手来 创建 一个宏了。首先我们要打开一个数据库,单击数据库窗口选项卡上的宏对象,然后单击数据库窗口上的新建选项。这时就弹出了宏设计器窗口。 因为这宏名和条件两列并不是宏设计窗口上的默认选项,没有这两列,如果要用到这两
讲了宏的设计窗口,现在该亲手来创建一个宏了。首先我们要打开一个数据库,单击数据库窗口选项卡上的"宏"对象,然后单击数据库窗口上的"新建"选项。这时就弹出了宏设计器窗口。
因为这"宏名"和"条件"两列并不是宏设计窗口上的默认选项,没有这两列,如果要用到这两个选项,就需要单击工具栏上的这两个选项。现在这两列都出现在窗口上了。这时我们就可以先为这个宏取个宏名,就叫"查询"吧,然后我们将鼠标移动到操作这一列的第一行中,左键单击下拉框右面的"向下"按钮,这时就会弹出一个下拉菜单,在这个菜单上选择所需的操作命令,然后单击这个选项,那这个操作就会出现在这个下拉框中了。现在我们要执行一个叫 "Gotocontrol"宏命令,那么就在这个下拉框中选中这个操作命令,如下图所示。
在选择了基本宏操作后,我们还要在宏设计窗口下部的操作参数"控件名称"中输入此操作需要的参数,为了确定操作对象的焦点,我们在这个位置输入"姓名 ",这样当我们执行这个宏的时候窗口上的焦点就会移动到"姓名"这个字段上来了。基本上每个操作都有操作参数,有的多一些,有的少一些,有的是必须填写的,有的则可以取默认的值。只有设置好参数的宏操作才是合法的。不然ACCESS就不会接受。
刚才我们所做的只是这个宏的第一个操作,将查询的焦点移到"姓名"这个字段上,下一步我们要再加一个操作去找到"姓名"这个字段中的相应记录。要实现这些,就将鼠标移动到表格的第二行,然后在操作这一个格选取"FINDRECORD",现在我们来设定操作参数,参数"查找内容"这一栏中,我们输入"=[需要查询的值].value",这个"需要查询的值"是窗体上一个专门用来输入查询值的文本框的名字,而"匹配"这一栏中选择"整个字段","格式化搜索"选 "是",其他的几个参数都可以取默认,将这些选好以后。"查询"宏就建好了。当然别忘了保存整个宏啊。

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

AI Hentai Generator
Generate AI Hentai for free.

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

1. Open settings in Windows 11. You can use Win+I shortcut or any other method. 2. Go to the Apps section and click Apps & Features. 3. Find the application you want to prevent from running in the background. Click the three-dot button and select Advanced Options. 4. Find the [Background Application Permissions] section and select the desired value. By default, Windows 11 sets power optimization mode. It allows Windows to manage how applications work in the background. For example, once you enable battery saver mode to preserve battery, the system will automatically close all apps. 5. Select [Never] to prevent the application from running in the background. Please note that if you notice that the program is not sending you notifications, failing to update data, etc., you can

DeepSeek cannot convert files directly to PDF. Depending on the file type, you can use different methods: Common documents (Word, Excel, PowerPoint): Use Microsoft Office, LibreOffice and other software to export as PDF. Image: Save as PDF using image viewer or image processing software. Web pages: Use the browser's "Print into PDF" function or the dedicated web page to PDF tool. Uncommon formats: Find the right converter and convert it to PDF. It is crucial to choose the right tools and develop a plan based on the actual situation.

According to news on July 12, the Honor Magic V3 series was officially released today, equipped with the new Honor Vision Soothing Oasis eye protection screen. While the screen itself has high specifications and high quality, it also pioneered the introduction of AI active eye protection technology. It is reported that the traditional way to alleviate myopia is "myopia glasses". The power of myopia glasses is evenly distributed to ensure that the central area of sight is imaged on the retina, but the peripheral area is imaged behind the retina. The retina senses that the image is behind, promoting the eye axis direction. grow later, thereby deepening the degree. At present, one of the main ways to alleviate the development of myopia is the "defocus lens". The central area has a normal power, and the peripheral area is adjusted through optical design partitions, so that the image in the peripheral area falls in front of the retina.

The Java reflection mechanism allows programs to dynamically modify the behavior of classes without modifying the source code. By operating the Class object, you can create instances through newInstance(), modify private field values, call private methods, etc. Reflection should be used with caution, however, as it can cause unexpected behavior and security issues, and has a performance overhead.

Ways to solve iframe cross-domain issues in Vue: CORS: Enable CORS support in the backend server and use XMLHttpRequest or fetch API to send CORS requests in Vue. JSONP: Dynamically load JSONP scripts in Vue using the JSONP endpoint in the backend server. Proxy server: Set up a proxy server to forward requests, use a third-party library (such as axios) in Vue to send requests and set the proxy server URL.

Common exception types and their repair measures in Java function development During the development of Java functions, various exceptions may be encountered, which affect the correct execution of the function. The following are common exception types and their repair measures: 1. NullPointerException Description: Thrown when accessing an object that has not been initialized. Fix: Make sure you check the object for non-null before using it. Sample code: try{Stringname=null;System.out.println(name.length());}catch(NullPointerExceptione){

Oracle can read dbf files through the following steps: create an external table and reference the dbf file; query the external table to retrieve data; import the data into the Oracle table.

According to news on July 19, Xiaomi MIX Fold 4, the first flagship folding new phone, was officially released tonight and is equipped with a "three-dimensional special-shaped battery" for the first time. According to reports, Xiaomi MIX Fold4 has achieved a major breakthrough in battery technology and designed an innovative "three-dimensional special-shaped battery" specifically for folding screens. Traditional folding screen devices mostly use conventional square batteries, which have low space utilization efficiency. In order to solve this problem, Xiaomi did not use the common winding battery cells, but developed a new lamination process to create a new form of battery, which greatly improved the space utilization. Battery Technology Innovation In order to accurately alternately stack positive and negative electrode sheets and ensure the safe embedding of lithium ions, Xiaomi has developed a new ultrasonic welding machine and lamination machine to improve welding and cutting accuracy.
