且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

插入日期为字符串

更新时间:2023-11-06 18:54:52

这样奇怪的事情都可能发生,如果你有一个名为日期您的表和/或现场控制命名为日期的形式。他们将(至少有时)需要precedence通过内置的日期函数,如果它们包含那么结果可能是类似于你的描述。

Strange things like this can happen if you have a field named Date in your table and/or a control named Date on your form. They will (at least sometimes) take precedence over the built-in Date function, and if they contain Null then the results can be similar to what you describe.

如果可能,从日期修改字段的名称更具说明性(或至少是不同的)。如果你不能改变字段的名称,然后考虑改变窗体的记录源到像

If possible, change the name of the field from Date to something more descriptive (or at least different). If you cannot change the name of the field then consider changing the Record Source of the form to something like

SELECT Table1.Foo, Table1.Date AS TheDate, ... FROM Table1

,然后让你的表单使用 TheDate 时,它需要操作的字段或控件。

and then have your form use TheDate when it needs to manipulate the field or control.