Search code examples
mysqlsqlms-accesssubform

How do I limit the display of an Access subform to 10?


I have multiple combo boxes in my form (Industry, Incorporation_Date, OperatingRev), and a search button which filters the subform (as a datasheet) based on the selection of each combo box. How do I limit the display of the subform to only 10 records (by Top 10 of Operatin Revenue)? Currently it is displaying all records available with the filter.

Appreciate any help, thanks!


Solution

  • In the Record Source used for your subform, your query should look like

    SELECT TOP 10 FROM …
    ORDER BY ...
    

    This post discusses more about using this: How to select top 10 in Access query?