SELECT id
FROM Activity
WHERE important = see below
IF [Forms]![Search]![important] = false
, search for both true
and false
IF [Forms]![Search]![important] = true
, search for only tru开发者_如何学运维e
I hope you understand what I want to do. Is this possible?
Try this:
SELECT id
FROM Activity
WHERE important = @important OR @important = false
Or, maybe (just like ammoQ said)
SELECT id
FROM Activity
WHERE important OR NOT [Forms]![Search]![important]
Probably the shortest form, though not very readable:
SELECT id
FROM Activity
WHERE important OR NOT @important
精彩评论