View Full Version : Selecting a number of records only


Moira Triance
09-27-2001, 09:55 AM
I have an Access 97 problem – I want to select a number of records in a query from a single table, but I want to be able to tell the query how many records to select. For example if I have 500 records in the table I want to tell the query to select the first 50 that match my selection criteria. How do I do it please? Any help gratefully accepted.

Liv Manto
09-27-2001, 10:06 AM
Ask the HELP for this topic:

Display only the highest or lowest values in the query's results

If your criteria is not one of list then go to the SQL view and change the value in there.

If you are doing this through a code, you can set the SQL with a variable.



[This message has been edited by Liv Manto (edited 09-27-2001).]

R. Hicks
09-27-2001, 10:37 AM
View your query in SQL view, change the beginning from:

SELECT ... rest of SQL

to:

SELECT TOP 50 ... rest of SQL

HTH
RDH