是/否字段

编程入门 行业动态 更新时间:2024-10-07 04:36:16
本文介绍了是/否字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想执行一个名为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>在消息中写道 news:11 ******************** @ o13g2000cwo.googlegrou ps ... 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> wrote in message news:11********************@o13g2000cwo.googlegrou ps... 我想执行一个名为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>写道: 我想Wayne的意思是说: 如果不是IsNull(我![customerid])或我![ChkStorehouse] = True或 我![ChkWareHouse] = True然后...... 此外,请确保在您的表格设计中,所有是/否字段都是 必需,并且具有合理的默认值(通常为:False)。在Yes / No字段中的null 值很少有意义。 -Tom。 On 17 Jan 2006 02:52:47 -0800, "solar" <sp*******@gmail> 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 thatcustomerid is Null ,the Yes/No control ChkStorehouse is set to True orthe Yes/No field ChkWarehouse is set to True . Unfortunately thefunction below does not obey me, and the code is performed even thoughthe ChkStorehouse is set to YesIf Not IsNull(Me![customerid]) Or IsNull(Me![ChkStorehouse]) ThenCancelOrderOnExitDoCmd.CancelEventEnd IfWhat is wrong ?

Tom van Stiphout< no ************* @ cox>写在 新闻:dl ******************************** @ 4ax: Tom van Stiphout <no*************@cox> wrote in news:dl********************************@4ax: 2006年1月17日02:52:47 -0800,solar < sp ******* @ gmail> 写道: 我认为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> 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 cancelorderonexitprovided that customerid is Null ,the Yes/No controlChkStorehouse is set to True or the Yes/No field ChkWarehouseis set to True . Unfortunately the function below does notobey me, and the code is performed even though theChkStorehouse is set to Yes If Not IsNull(Me![customerid]) OrIsNull(Me![ChkStorehouse]) Then CancelOrderOnExitDoCmd.CancelEventEnd IfWhat is wrong ?

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

-- Bob Quintal PA is y I''ve altered my email address.

更多推荐

是/否字段

本文发布于:2023-11-28 03:11:35,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1640736.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:字段

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!