Omitting fields from query based on value

Kozbot

Registered User.
Local time
Yesterday, 20:21
Joined
Jan 16, 2013
Messages
110
Hello

I am making a parameter query that looks up quality data by lot number. For some of the lot numbers certain fields of data may be null. How can I omit these fields in the query if they are null?

OR automatically omit them when exporting them data to excel?
 
Depending on the context within your query you can use one or more of the following:

Iif(isnull(yourfield),AnswerA,AnswerB)
nz(yourfield,AnswerA)
WHERE yourfield Is Null
WHERE yourfield Is Not Null

If exporting, you can't omit a field on a line by line basis, instead use the Iif or nz functions above to substitute a suitable value
 

Users who are viewing this thread

Back
Top Bottom