访问查询标准 [英] Access Query Criteria
问题描述
您好
我需要以下帮助:
我想运行一个显示"Backlog"的查询。或"规范"基于表中名为"买家名称"的字段。我还有一个名为"backlog / spec"的字段。在同一张表中但是空白。当我运行查询时,
基于字段"买方名称"和在表中,如果有名称,则在字段"backlog / spec"中在同一个表中,它应显示"backlog";如果没有买家名称,则应显示"spec"。如何在
查询中执行此操作?希望这是有道理的。
I want to run a query that will display either "Backlog" or "spec" based on a field named "buyer Name" in a table. I also have a field named "backlog/spec" in the same table but is blank. When I run the query, based on the field "buyer Name" in the table, if there is a name, then in the field "backlog/spec" in the same table, it should display "backlog'; if there is no buyer name, it should display "spec". how can I do that in a query? hope that makes sense.
谢谢
Sylvie
推荐答案
Hi Sylvie,
Hi Sylvie,
您可以在查询中执行此操作,并且表中不需要相同的字段。例如:
You can do this in a query, and you don't need the same field in the table. For example:
SELECT [买方名称],IIf(IsNull([买方名称]),"规格","积压日期")AS BacklogOrSpec FROM TableName
SELECT [buyer Name], IIf(IsNull([buyer Name]),"spec","backlog") AS BacklogOrSpec FROM TableName
希望它有所帮助......
Hope it helps...
这篇关于访问查询标准的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!