Ms Access 2010 tutorial:select top unique records

Select top unique records

III.3. Retrieve Top Records

You can display a number of top records as you want by using Top Values property. For example, TblCustomer has the following records.

Microsoft Access 2010 TblCustomer 

If you want to display only 5 records, you have to create a select query and set 5 to Top Values property as the figure.

Microsoft Access 2010 retrieve a limited number records 


Microsoft Access 2010 a limited number records result 

III.4. Retrieve Unique Values

In the select query, you can get no duplicate values by using Unique Values property. For example, you want to retrieve the unique names of customers of TblCustomer. To do so, you need to set yes in front of unique values property as the figure below:

Microsoft Access 2010 retrieve unique values 

Note: To display the property sheet, you can press F4 or Alt + ENTER or click property sheet on the ribbon.

Microsoft Access 2010 property sheet 

III.5. Retrieve Unique Records

You can get the unique records of the tables by using Unique Records property. The following tables show all data of TblCustomer and TblSaleMaster.

Microsoft Access 2010 TblCustomer and TblSaleMaster 

From the two tables above, you want to show the unique records of customer id and customer name field. To do so, follow the figure below:

Microsoft Access 2010 retrieve unique reocrds 

The two tables have a relationship with each other through CusID of TblCustomer and CustomerID of TblSaleMaster. The Unique Records property affects the data based on this relationship.

Note: The Unique Records property does not effect the single table. The Unique Records and the Unique Values property are related. If you set Yes to the Unique Records property, the Unique Values property automatically set No.


Microsoft Access 2010 unique reocrds result 


This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages:
C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.