是/否字段 [英] Yes/No field

查看:95
本文介绍了是/否字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想执行一个名为cancelorderonexit的函数,前提是

customerid为Null,Yes / No控件ChkStorehouse设置为True或

是/否字段ChkWarehouse设置为True。不幸的是,下面的

函数不服从我,即使将ChkStorehouse设置为是

,也执行代码

如果不是IsNull(我![customerid])或IsNull(我![ChkStorehouse])然后

CancelOrderOnExit

DoCmd.CancelEvent

结束如果


有什么问题?

I want to perform a function called cancelorderonexit provided that
customerid is Null ,the Yes/No control ChkStorehouse is set to True or
the Yes/No field ChkWarehouse is set to True . Unfortunately the
function below does not obey me, and the code is performed even though
the ChkStorehouse is set to Yes
If Not IsNull(Me![customerid]) Or IsNull(Me![ChkStorehouse]) Then
CancelOrderOnExit
DoCmd.CancelEvent
End If

What is wrong ?

推荐答案

If语句中的逻辑与你不匹配说你想做。要

它与你想说的相符,它应该是


如果IsNull(我![customerid])或我!{ChkStoreHouse]或者我![ChkStorehouse]然后


-

Wayne Morgan

MS Access MVP

"太阳能" < SP ******* @ gmail.com>在消息中写道

news:11 ******************** @ o13g2000cwo.googlegrou ps.com ...
The logic in the If statement doesn''t match what you said you want to do. To
have it match what you said you want to do, it should be

If IsNull(Me![customerid]) Or Me!{ChkStoreHouse] Or Me![ChkStorehouse] Then

--
Wayne Morgan
MS Access MVP
"solar" <sp*******@gmail.com> wrote in message
news:11********************@o13g2000cwo.googlegrou ps.com...
我想执行一个名为cancelorderonexit的函数,前提是
customerid为Null,Yes / No控件ChkStorehouse设置为True或
是/否字段ChkWarehouse设置为True。不幸的是,下面的
函数不服从我,即使ChkStorehouse设置为Yes
如果Not IsNull(Me![customerid])或IsNull(Me![ ChkStorehouse])然后
CancelOrderOnExit
DoCmd.CancelEvent
结束如果

有什么问题?
I want to perform a function called cancelorderonexit provided that
customerid is Null ,the Yes/No control ChkStorehouse is set to True or
the Yes/No field ChkWarehouse is set to True . Unfortunately the
function below does not obey me, and the code is performed even though
the ChkStorehouse is set to Yes
If Not IsNull(Me![customerid]) Or IsNull(Me![ChkStorehouse]) Then
CancelOrderOnExit
DoCmd.CancelEvent
End If

What is wrong ?



2006年1月17日02:52:47 -0800,solar和solar。 < SP ******* @ gmail.com>写道:


我想Wayne的意思是说:

如果不是IsNull(我![customerid])或我![ChkStorehouse] = True或

我![ChkWareHouse] = True然后......


此外,请确保在您的表格设计中,所有是/否字段都是

必需,并且具有合理的默认值(通常为:False)。在Yes / No字段中的null

值很少有意义。


-Tom。

On 17 Jan 2006 02:52:47 -0800, "solar" <sp*******@gmail.com> wrote:

I think Wayne meant to say:
If Not IsNull(Me![customerid]) Or Me![ChkStorehouse]=True or
Me![ChkWareHouse]=True Then ...

Also, make sure that in your table design, all Yes/No fields are
Required, and have a sensible default value (typically: False). A null
value in a Yes/No field rarely makes sense.

-Tom.

我想执行一个名为cancelorderonexit的函数,前提是
customerid为Null,Yes / No控件ChkStorehouse设置为True或
是/否字段ChkWarehouse设置为True。不幸的是,下面的
函数不服从我,即使ChkStorehouse设置为Yes
如果Not IsNull(Me![customerid])或IsNull(Me![ ChkStorehouse])然后
CancelOrderOnExit
DoCmd.CancelEvent
结束如果

有什么问题?
I want to perform a function called cancelorderonexit provided that
customerid is Null ,the Yes/No control ChkStorehouse is set to True or
the Yes/No field ChkWarehouse is set to True . Unfortunately the
function below does not obey me, and the code is performed even though
the ChkStorehouse is set to Yes
If Not IsNull(Me![customerid]) Or IsNull(Me![ChkStorehouse]) Then
CancelOrderOnExit
DoCmd.CancelEvent
End If

What is wrong ?






Tom van Stiphout< no ************* @ cox.net>写在

新闻:dl ******************************** @ 4ax.com:
Tom van Stiphout <no*************@cox.net> wrote in
news:dl********************************@4ax.com:
2006年1月17日02:52:47 -0800,solar < sp ******* @ gmail.com>
写道:

我认为Wayne的意思是说:
如果不是IsNull(我![customerid])或者我![ChkStorehouse] = True或
我![ChkWareHouse] = True然后......

此外,请确保在您的表格设计中,所有是/否字段是必需的,并且具有合理的默认值(通常:
False)。 是/否字段中的空值很少有意义。

-Tom。


除了{而不是[和错误的

变量名称]之外,没有他没有。


我![chkstorehouse]已包含true或false的值,

为什么要生成测试以查看true = true?


我![ chkstorehouse]是一个有效的条件。
On 17 Jan 2006 02:52:47 -0800, "solar" <sp*******@gmail.com>
wrote:

I think Wayne meant to say:
If Not IsNull(Me![customerid]) Or Me![ChkStorehouse]=True or
Me![ChkWareHouse]=True Then ...

Also, make sure that in your table design, all Yes/No fields
are Required, and have a sensible default value (typically:
False). A null value in a Yes/No field rarely makes sense.

-Tom.
No he didnt, other than a typo of { instead of [ and the wrong
variable name.

Me![chkstorehouse] already contains the value of true or false,
so why generate a test to see if true = true?

Me![chkstorehouse] is a valid conditional.


我想执行一个名为cancelorderonexit的函数
,前提是customerid是Null,是/否控制
ChkStorehouse设置为True或是/否字段ChkWarehouse
设置为True。不幸的是,下面的功能并没有服从我,即使将ChkStorehouse设置为Yes,如果不是IsNull(我![customerid])或者
IsNull(我![ ChkStorehouse])然后CancelOrderOnExit
DoCmd.CancelEvent
结束如果

有什么问题?
I want to perform a function called cancelorderonexit
provided that customerid is Null ,the Yes/No control
ChkStorehouse is set to True or the Yes/No field ChkWarehouse
is set to True . Unfortunately the function below does not
obey me, and the code is performed even though the
ChkStorehouse is set to Yes If Not IsNull(Me![customerid]) Or
IsNull(Me![ChkStorehouse]) Then CancelOrderOnExit
DoCmd.CancelEvent
End If

What is wrong ?




-

Bob Quintal


PA是我改变了我的电子邮件地址。



--
Bob Quintal

PA is y I''ve altered my email address.


这篇关于是/否字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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