I have a database of questions which I use for a local quiz league and want to be able to produce random questions based on category and difficulty. I currently have the following query: -

SELECT TOP 10 Questions.*, Questions.Difficulty, Questions.[Main Category], Questions.[Specialist Category]
FROM Questions
WHERE (((Questions.Difficulty)=Forms![Random Questions]!DifficultyRating) And ((Questions.[Main Category])=Forms![Random Questions]![Main Category])) Or (((Questions.[Specialist Category])=Forms![Random Questions]![Specialist Category]))
ORDER BY Rnd([Question ID]);

Which generates 10 random questions based on the restrictions mentioned, however I want to be able to make the number of questions a variable chosen from a combo box or text box on a form. Is this possible and easily integrated into this query and if so, how?


If anyone could help, it would be greatly appreciated, my email address for correspondance is marklord82@hotmail.com

Cheers,

Mark