Access solves the problem that the combo box cannot meet the needs of a large amount of data.

Source: Internet
Author: User
Problem: Access has a combo box that allows you to quickly select the required data from multiple rows of records. But what if the record exceeds? It is very inconvenient to select. What should I do? A: In fact, a lot of data can be classified (stratified), and we can pre-filter data. The following example is repeated.

Problem: There is a combination box in Access to quickly select the required data from multiple rows of records. But what if the record exceeds? It is very inconvenient to select. What should I do? A: In fact, a lot of data can be classified (stratified), and we can pre-filter data. The following example is repeated.

Problem:

Access hasCombinationBox, you can quickly record from multiple rowsSelectRequiredData. But what if the record exceeds?SelectIt is very inconvenient. What should I do?

Answer:

Actually manyDataCan be classified (layered ).SelectAnd we can pre-filterData.

In the following example, the same form class is repeatedly opened for multiple layers.DataOfSelect.

Of course, pre-screening is also included.DataFunction.

Before reading this article, please refer:

New users: how to design a table structure to facilitate the display of treeview?

Http://access911.net/index.asp? Board = 4 & recordid = 75FABE1E12DC

To learn how to defineDataThe table structure can be easily classified and displayed.

And read:

How to repeat a form twice and display differentData?

Http://access911.net/index.asp? Board = 4 & recordid = 72FAB11E15DC

To understand that a FORM in ACCESS is actually a class

Now start:

1. Create a form (testForm) with a text box (text0) and a button (Command2 ).

2. Create a form (selectForm) with a list box (list0 ).

3. In the "updated" event of the text box in testForm, write the following code to open the product name.SelectForm (selectForm), and assign values to the row source (RowSource) of the list box (list0.

PrivateSubText0_AfterUpdate ()
DoCmd. OpenForm "selectform"
'This line of code implements fuzzy search for the BTYPE table, using the LIKE keyword in the WHERE clause for wildcard
Forms ("selectform"). List0.RowSource = "SELECTbtype. soncount, btype. UserCode, btype. FullName, btype. typeIdFROMbtypeWHEREbtype. fullnamelike '*" & Text0.Value &"*'"
EndSub

4. In the "click" event of the command button in testForm, write the following code to open the product name.SelectForm, search by category

12 next page

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.