在 Access 查询中将文本字段格式设置为日期
Format Text Field To Date In Access Query
我在 Access 中有一个表单,其中有两个格式为短日期的文本框。我现在正试图捕获这些值并在 WHERE
子句的查询中使用。我试过这个语法
Between CDate([Forms]![Form1]![date1]) And CDate([Forms]![Form1]![date2])
This expression is typed incorrectly, or it is to complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables.
我应该如何捕获和转换表单文本框中的条目,以便我可以在查询中使用它们?
指定免于猜测的访问参数,然后使用这些 "as is":
Parameters
[Forms]![Form1]![date1] DateTime,
[Forms]![Form1]![date2] DateTime;
Select
<your select statement>
From
<your table/query>
Where
[YourDateField] Between
[Forms]![Form1]![date1] And
[Forms]![Form1]![date2]
我在 Access 中有一个表单,其中有两个格式为短日期的文本框。我现在正试图捕获这些值并在 WHERE
子句的查询中使用。我试过这个语法
Between CDate([Forms]![Form1]![date1]) And CDate([Forms]![Form1]![date2])
This expression is typed incorrectly, or it is to complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables.
我应该如何捕获和转换表单文本框中的条目,以便我可以在查询中使用它们?
指定免于猜测的访问参数,然后使用这些 "as is":
Parameters
[Forms]![Form1]![date1] DateTime,
[Forms]![Form1]![date2] DateTime;
Select
<your select statement>
From
<your table/query>
Where
[YourDateField] Between
[Forms]![Form1]![date1] And
[Forms]![Form1]![date2]