问题描述
你好,
我有一个表单,其中包含一个按客户评级对表格进行分段的字段。评级为A,B,C和未评级。
这就是我希望它如何工作:
如果用户选择C,例如,作为评级,查询应返回所有评级为< = C的客户。如果用户选择未评级,则查询应该只返回未评级的客户。
为了举例说明我目前的方法,这就是我所处的位置(虽然它没有'工作!):
IIf([Forms]![generator]![rating] =" not rated",not rated,([table1]。[ rating_code])< = [Forms]![generator]![rating])
我已将此代码放入条件中查询设计视图中的一行,在[table1]列中。[rating_code]。
我很难过...我尝试了各种方法,看起来不行让它工作。
任何帮助或提示都将不胜感激。
谢谢!
- 约翰
Hello,
I have a form that includes a field for segmenting a table by customer "rating." The ratings are A, B, C, and Not Rated.
Here''s how I''d like it to work:
If the user selects "C" as a rating, for example, the query should return all customers rated <=C. If the user selects "Not Rated," the query should only return customers who are "not rated."
To give you an example of my current approach, this is where I''m at (though it doesn''t work!):
IIf([Forms]![generator]![rating]="not rated","not rated",([table1].[rating_code])<=[Forms]![generator]![rating])
I have put this code into the "criteria" row in query design view, in the column [table1].[rating_code].
I''m stumped...I''ve tried various approaches and can''t seem to get it working.
Any help or hints would be greatly appreciated.
Thank you!
- John
推荐答案
这篇关于添加<>运营商向IIF声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!