Beerman3436
Registered User.
- Local time
- Today, 02:00
- Joined
- Mar 29, 2000
- Messages
- 29
If I using this line of code to try to pull out the top 5 values from a query:
.Source = "Select TOP 5 [Name],[SupDiff] From QryCover WHERE (((QryCover.SupDiff)>=2)) OR (((QryCover.SupDiff)<=-2)) ORDER By [Name]"
It works fine but what I need to know is how to find the greatest vlues in the field not just the first 5 it comes to.
It gives me this right now:
-2
+2
-2
+2
-8
But I know that later in the field there is a -5 value. How can I get it to look at the whole field and them take the top 5 values?
.Source = "Select TOP 5 [Name],[SupDiff] From QryCover WHERE (((QryCover.SupDiff)>=2)) OR (((QryCover.SupDiff)<=-2)) ORDER By [Name]"
It works fine but what I need to know is how to find the greatest vlues in the field not just the first 5 it comes to.
It gives me this right now:
-2
+2
-2
+2
-8
But I know that later in the field there is a -5 value. How can I get it to look at the whole field and them take the top 5 values?