编写查询时出现问题 [英] Problems writing a Query

查看:80
本文介绍了编写查询时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定如何在查询条件中正确地写这个,有人可以帮助我。


If([Forms]![frmCabinetScorecard]![txtCabinet] = Test1然后喜欢(客户计算或网络解决方案))


谢谢,


Ryan

I am not sure how to write this correctly in the criteria of a query, could someone help me.

If ([Forms]![frmCabinetScorecard]![txtCabinet] = "Test1" Then Like ("Client Computing" or "Network Solutions"))

Thanks,

Ryan

推荐答案


我不确定如何在查询条件中正确地写这个,有人可以帮助我。


If([Forms]![frmCabinetScorecard]![txtCabinet] =" Test1" Then Like(Client Computing或Network Solutions))

谢谢,


Ryan
I am not sure how to write this correctly in the criteria of a query, could someone help me.

If ([Forms]![frmCabinetScorecard]![txtCabinet] = "Test1" Then Like ("Client Computing" or "Network Solutions"))

Thanks,

Ryan



尝试:

iif([表格] ]![frmCabinetScorecard]![txtCabinet] =" Test1",Like(Client Computing或Network Solutions),NA)

说实话,我'从来没有尝试在查询中引用表单,所以我不喜欢我不知道会怎么样。另外,如果[txtCabinet]不等于Test1,我不知道你想要发生什么。我只是把NA,但你会把你想做的事情(这是声明中的其他部分)。

格式如下:

iif(logical_test,[value_if_true],[value_if_false])

Try:
iif([Forms]![frmCabinetScorecard]![txtCabinet] = "Test1", Like ("Client Computing" or "Network Solutions"),"NA")
To be perfectly honest, I''ve never tried referencing a form in a query, so I don''t know how that will result. Also, I don''t know what you want to happen if [txtCabinet] does not equal "Test1". I just put NA, but you would put what you want it to do (that''s the else part of the statement).
The format goes like this:
iif(logical_test, [value_if_true], [value_if_false])


谢谢,我会告诉你发生了什么......我已成功拨打电话几次,但我有从来没有在查询中使用过if语句。


Darkhat01
Thanks, I will let you know what happens... I have successfully made calls a few times to a form, but I have never used a if statement in a query before.

Darkhat01



谢谢,我会的让你知道会发生什么......我已经成功地对表单进行了几次调用,但我之前从未在查询中使用过if语句。


Darkhat01
Thanks, I will let you know what happens... I have successfully made calls a few times to a form, but I have never used a if statement in a query before.

Darkhat01



确保在iif语句中使用了两个ii'!这意味着当且仅当如果......


问候,

Scott

Make sure you use both ii''s in the iif statement! It means If and only If...

Regards,
Scott


这篇关于编写查询时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆