本文介绍了没有默认值属性设置的是/否类型的A97表字段是否具有默认值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我有一个带有Yes / No字段的A97表名为 TowJob和绑定到该表的表单。 表单上的TowJob控件绑定到相同的 字段。这是一个选项组,其中包含Yes和No bttns 分别为-1和0。 除非我专门设置表字段'的defaultvalue 到Null,窗体中出现一个自动值控制中的为0?该控件没有默认值 值属性设置。为什么会这样? 为什么必须将一个表格字段的' defaultvalue属性设置为Null而不是简单地输入 什么都没有进入defaultvalue属性设置字段? 解决方案 我不确定,但这就是在Access中Yes / No字段类型的工作方式。 在相关主题上,听起来好像你可能依赖于Null为 值,因此您有一个Yes / No字段的值。通常认为做这种事情并不是一个好主意。事实上, 严格的数据库设计理论家会告诉你记录中没有字段 应该是null(关于这个概念和实际做法的想法是什么) $ b当然不同)。 Nulls不包含在索引中,null不会 等于null。 我这种方法的方法是使用数字字段和限制 值为0,1,2或1,2,3或其他什么。你可能会发现这是一个更好的方法来做事情并限制使用是/否字段到dtabase 只有两种状态的实体。 - Tim http:/ /www.ucs.mun.ca/~tmarshal/ ^ o< /#)" Burp-beep,burp-beep,burp-哔"?; - Quaker Jake / ^^Whatcha doin? - 同上TIM-MAY !! - 我 我不确定,但这就是Yes / No字段类型的工作方式访问。 在相关主题上,听起来好像你可能依赖Null作为值,因此你有一个Yes / No字段的值。通常认为做这种事情并不是一个好主意。事实上,严格的数据库设计理论家会告诉你,记录中的任何字段都不应该为空(当然,对这个概念和实际实践的想法不同)。 Nulls不包含在索引中,null不等于null。 我这种方法的方法是使用数字字段并将值限制为0 ,1,2或1,2,3或其他什么。你可能会发现这是一个更好的方法来做事情并限制使用是/否字段到dtabase 只有两种状态的实体。 我不确定,但这就是Yes / No字段类型的工作方式访问。 在相关主题上,听起来好像你可能依赖Null作为值,因此你有一个Yes / No字段的值。通常认为做这种事情并不是一个好主意。事实上,严格的数据库设计理论家会告诉你,记录中的任何字段都不应该为空(当然,对这个概念和实际实践的想法不同)。 Nulls不包含在索引中,null不等于null。 我这种方法的方法是使用数字字段并将值限制为0 ,1,2或1,2,3或其他什么。你可能会发现这是一个更好的方法来做事情并限制使用是/否字段到dtabase 只有两种状态的实体。 I have an A97 table with a Yes/No field namedTowJob and a form bound to that table. TheTowJob control on the form is bound to the samefield. It is an option group with Yes and No bttnsvalued at -1 and 0 respectively.Unless I specifically set the table field''s defaultvalueto Null, the form comes up with an automatic valueof 0 in the control? The control has NO defaultvalue property setting. Why is that?Why must one EXPLICITYLY set a table field''sdefaultvalue property to Null instead of simply enteringnothing at all into the defaultvalue property setting field? 解决方案I''m not sure, but that''s the way the Yes/No field type works in Access.On a related subject, it sounds as if you might be relying on Null as avalue so that you''d have three values for a Yes/No field. It''sgenerally considered not a good idea to do this sort of thing. In fact,strict database design theorists will tell you no field in a recordshould ever be null (thoughts on this concept and actual practice dodiffer, of course). Nulls aren''t included in indexes and null does notequal null.My approach to this sort of thing is to use a numeric field and limitthe values to 0, 1, 2 or 1, 2, 3 or something. You might find this abetter way to do things and restrict the use of Yes/No fields to dtabaseentities for which there are only two states.--Tim http://www.ucs.mun.ca/~tmarshal/^o</#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - MeI''m not sure, but that''s the way the Yes/No field type works in Access.On a related subject, it sounds as if you might be relying on Null as avalue so that you''d have three values for a Yes/No field. It''sgenerally considered not a good idea to do this sort of thing. In fact,strict database design theorists will tell you no field in a recordshould ever be null (thoughts on this concept and actual practice dodiffer, of course). Nulls aren''t included in indexes and null does notequal null.My approach to this sort of thing is to use a numeric field and limitthe values to 0, 1, 2 or 1, 2, 3 or something. You might find this abetter way to do things and restrict the use of Yes/No fields to dtabaseentities for which there are only two states. I''m not sure, but that''s the way the Yes/No field type works in Access.On a related subject, it sounds as if you might be relying on Null as avalue so that you''d have three values for a Yes/No field. It''sgenerally considered not a good idea to do this sort of thing. In fact,strict database design theorists will tell you no field in a recordshould ever be null (thoughts on this concept and actual practice dodiffer, of course). Nulls aren''t included in indexes and null does notequal null.My approach to this sort of thing is to use a numeric field and limitthe values to 0, 1, 2 or 1, 2, 3 or something. You might find this abetter way to do things and restrict the use of Yes/No fields to dtabaseentities for which there are only two states. 这篇关于没有默认值属性设置的是/否类型的A97表字段是否具有默认值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-14 02:23