Use criteria for conditional query--1.4. Select the criteria for the query from the form _access

Source: Internet
Author: User

4. Select a query from the form before the method, although simple, but for the user is not easy to operate, the designer is also difficult to control, if the form to implement, these problems can be solved. As in the following form, the runtime user can select the driver's name in the combo box and press the query button to see the results of the query.

The following is a detailed list of the steps for the design:

Create a form, press the Control Wizard button, and add a combo box to the form. In the first dialog box
Select "I want the combo box to find these values in a table or query," next.

Select a table or query that provides data for the combo box. Next.

Select the data you want to display in the combo box, usually selecting the primary key for the table in addition to the fields that you want to appear in the combo box. Next.

If the primary key is an AutoNumber field, usually select Hide primary key column, and next, give the combo box a name and finish.

To build a query, enter the field name of the form combo box in the criteria for the field of the query, enter "[forms]! [Conditional query]! [Driver to inquire] '. For convenience, you can use an Expression Builder to generate this expression. Save this query as "Search by driver name".

Then go back to the form and add a button. Select Miscellaneous/Run queries in the first dialog box of the Control Wizard. Next.

Select the newly built query "by driver name query", next.

Enter the text displayed on the button, or use a picture to indicate the button. Next, give the button a name and finish.

0 run this form, as shown in the top image on this page, select "Horse Jack" in the combo box and press the "query" button to see the results of the query

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.