Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Access query returns 60 records I wish to change so it returns only 15 results at a time.

Status
Not open for further replies.

47redlands

Programmer
Mar 9, 2010
62
0
0
GB
I am using MS Access. I have created a MS Access query.
The query returned about 60 records
I want to only examine about 15 results at a time.
How can I change my query to do?

Thank you in advance
 
Use the TOP predicate:
SELECT TOP 15 ...

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
hi,

I want to only examine [highlight]about 15[/highlight] results at a time.

How would you quantify [highlight]that[/highlight] as a programmer?

How far away from 15 can that be, according to your specification? It would certainly need to be an integer number of rows, one or more. Would that be an equal number of rows plus or minus? Do you want this value about 15 randomly generated, or do you have some other algorithm in mind?

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
How are ya 47redlands . . .

If the query has a [blue]sort order[/blue] something like

Code:
[blue]Select TOP 15 ...
WHERE [sortfieldname]>[purple][b]somenumber[/b][/purple][/blue]

[purple]somenumber[/purple] has to be writen into the where clause but at least it allows for tracking.

[blue]Your Thoughts? . . .[/blue]

See Ya . . .

Be sure to see FAQ219-2884 Worthy Reading! [thumbsup2]
Also FAQ181-2886 Worthy Reading! [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top