parameter query

tselie115

Registered User.
Local time
Yesterday, 21:35
Joined
Aug 10, 2008
Messages
44
im built a paramter query with 3 paramters jobno, ponumber and material.
when i fill the three of them i get the wanted result.
when i keep any of them empty it gives to result so i added the "is null" but its giving me all the results.
wat i want is for example if i fill the first paramter(jobno) and keep the others empy to give me all the result with this "jobbo" specified in the parameter.
how can this be done?
 
Howzit

Make each of your paramter queries something like:

Code:
Like "*" & [yourcurrentparameter] & "*"
 
SELECT *
FROM Jobs
WHERE JobNo = IIF(JobNoParam is null, JobNo, JobNoParam)

I'm taking a wild guess. Here's a way to handle one of the paramters (do the same for each one). The idea is that if no param is entered (i.e null param), then the clause reduces to

WHERE JobNo = JobNo (which is always true and so returns all records).

Build a similar IIF clause for each of the remaining params.
 

Users who are viewing this thread

Back
Top Bottom