Officially, pure SQL is a set-based language i.e. queries return a set of results and the overall number of records is arbitrary. This isn't too practical for what you want to do, so most database vendors extend SQL with their own mechanism for limiting queries to 'n' records e.g. Sybase allows you to "set @@rowcount 10" for example. The problem with this is that you need to ensure you have the records ordered correctly, as you'll just return the first 10 records that match.

The correct SQL technique for this type of problem is to use a cursor. You declare a cursor for a given SQL statement, then open it (which executes the query), then you can fetch individual records using procedural code and close it when you are done. You should be able to break out of the loop when you get to 10 records. I'm not familiar with Access syntax, but there should be enough information in the help to get you going...

Email me directly if you're stuck and I'll see if I can find you an example of a cursor, but I think you'll probably find stuff on the internet faster than I can dig out a book!

Hope that helps!

Robin
(rmail: [email protected])