views:

108

answers:

2
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?

+3  A: 

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]
Rubens Farias
+2  A: 

Probably the shortest form, though not very readable:

SELECT id
FROM Activity
WHERE important OR NOT @important
ammoQ
+1 loved it, ty
Rubens Farias
What does the `@` do?
Johan
it means: "your variable here"
Rubens Farias