Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如果为false,则在Access sql中同时搜索true和false_Sql_Ms Access 2007 - Fatal编程技术网

如果为false,则在Access sql中同时搜索true和false

如果为false,则在Access sql中同时搜索true和false,sql,ms-access-2007,Sql,Ms Access 2007,IF[Forms]![搜索]![重要信息]=false,搜索true和false IF[Forms]![搜索]![重要信息]=true,仅搜索true 我希望你明白我想做什么。这可能吗?试试这个: SELECT id FROM Activity WHERE important = see below 或者,也许(就像阿莫克说的那样) 试试这个: SELECT id FROM Activity WHERE important = see below 或者,也许(就像阿莫克说的那样) 可能是最短

IF[Forms]![搜索]![重要信息]=false
,搜索
true
false

IF[Forms]![搜索]![重要信息]=true
,仅搜索
true

我希望你明白我想做什么。这可能吗?

试试这个:

SELECT id
FROM Activity
WHERE important = see below
或者,也许(就像阿莫克说的那样)

试试这个:

SELECT id
FROM Activity
WHERE important = see below
或者,也许(就像阿莫克说的那样)


可能是最短的形式,但可读性不强:

SELECT id
FROM Activity
WHERE important OR NOT [Forms]![Search]![important]

可能是最短的形式,但可读性不强:

SELECT id
FROM Activity
WHERE important OR NOT [Forms]![Search]![important]
它的意思是:“你的变量在这里”它的意思是:“你的变量在这里”