I need to run a separate query if my query results total is greater than 20 but if there are more than 20 I just need all records to show. The second query will pull a random 5% if there are more than 20 records.
I need to run a separate query if my query results total is greater than 20 but if there are more than 20 I just need all records to show. The second query will pull a random 5% if there are more than 20 records.
A DCount() with no criteria will return the number of records.
Great but I need to find out if the query results are greater than 20 and if they are then run a different query to randomize records but if it's less than 20 I want to bypass the query to randomize and display all the records.
Code:If DCount(...) > 20 Then run one query Else run the other End If