如何查询仅在当天创建的数据? (Access 2003) [英] How to Query data created only on the current day? (Access 2003)

查看:105
本文介绍了如何查询仅在当天创建的数据? (Access 2003)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在文本框中显示数据总数,Textbox200在表格主人上,但我只想显示当前的每日数据。

我目前从以下数据获取数据:

I am trying to display total numbers of data in a textbox, "Textbox200" on a form "Master", but I only want to display current daily data.
I currently get the data from:

展开 | 选择 | Wrap | 行号

推荐答案

你可以在Dcount中添加一个WHERE子句,试试:
You can add a WHERE clause to the Dcount, try:
展开 | 选择 | Wrap | 行号


我试过了,我收到一条错误,指出你取消了之前的操作。

当我点击Debug时,它点亮该行。


Me.Text191 = DCount(" [Call Log]",[LIVEQuery]" ,[Text82] =日期)


Text82是=格式(日期(),长日期)& " " &安培;格式(时间(),长时间)

"代码。


我可能还是没有得到它......



我有一个字段我的表格是添加日期/时间,这是每条记录提交日期和时间的标记。有没有办法在我的LIVEQuery中包含该文件。并按今天的日期排序"?


谢谢!
I tried that and I get an error that states "You cancelled the previous operation".
When I click Debug, it hi-lights that line.

Me.Text191 = DCount("[Call Log]", "[LIVEQuery]", "[Text82]=Date")

Text82 is the "=Format(Date(),"Long Date") & " " & Format(Time(),"Long Time")
" code.

I''m probably still not getting it......


I have a field in my table that is "Date/Time Added", which is a stamp of the date and time each record was submitted. Is there a way to include that filed in my "LIVEQuery" and sort by "Today''s date"?

Thannks!


我在日期/时间的条件中尝试了这个加入"在查询中提交:

喜欢12/23/2009 *

,它的工作范围只能从12/23带回记录。现在我想把它与当前日期联系起来:

喜欢[= Date()] *

或类似的东西?我需要该领域的明星,因为它也有时间。
I tried this in the criteria for the "Date/Time Added" filed in the query:
Like "12/23/2009*"
and it worked as far as bringing back only records from 12/23. Now I''m trying to tie that to the current date:
Like "[=Date()]*"
or something like that? I need the star for that field because it has the time as well.


这篇关于如何查询仅在当天创建的数据? (Access 2003)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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