Reputation: 19072
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 true
I hope you understand what I want to do. Is this possible?
Upvotes: 0
Views: 903
Reputation: 57966
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]
Upvotes: 3
Reputation: 36987
Probably the shortest form, though not very readable:
SELECT id
FROM Activity
WHERE important OR NOT @important
Upvotes: 2