How a multiparameter query returns all records if all r null?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I make a multi-parameter query returns all records if none of the
parameters is specified? What the help suggests works only if the query has
only one parameter. Thanks.
 
PARAMETERS [TestID?] Long, [TestText?] Text ( 255 ), [TestNum?] Long;
SELECT tblTest.TestID, tblTest.TestText, tblTest.TestNum
FROM tblTest
WHERE (((tblTest.TestID)=[TestID?])) OR (((tblTest.TestText)=[TestText?]))
OR (((tblTest.TestNum)=[TestNum?])) OR ([TestID?] IS NULL AND [TestText?] IS
NULL AND [TestNum?] IS NULL)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top