具有基于时间的特定标准的Dcount ... [英] Dcount with specific criteria based on time...

查看:71
本文介绍了具有基于时间的特定标准的Dcount ...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Access 2003中工作,很可能有另一个愚蠢的问题要问!我有以下代码:

I''m working in Access 2003 and most likely have another stupid question to ask! I have the following code:

展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号

推荐答案

嗨。回答您的问题,您需要包含文本框的值,为此,您可以将DCount WHERE子句文本字符串拆分为较小的文本部分,并将所需的值放入其中。

Hi. Answering what you have asked, you need to include the value of your textbox, and to do this you break up the DCount WHERE-clause text string into smaller sections of text into which you place the value you need.

展开 | 选择 < span class =codeDivider> | Wrap | 行号


谢谢Stewert!我最初编程的地方是用户输入他们想要查看的数据的开始日期和结束日期,但我需要做的是查看每天从早上7点到下午6点的小时块中的所有呼叫。因此,如果他们进入3-1-2010的开始,并且在3-5-2010结束时,我不知道如何收集7到8,8到9的所有5个dyas ...........并显示每个的计数。


我完全理解如果我将用户重新选择只有一天,但多天让我感到困惑,那会怎样。所以我决定在给定的月份显示数据。


感谢代码示例!这正是我所寻找的。我会看看你的链接!我相信我会学到很多东西!!!!
Thanks Stewert! I originally programmed it where the user would enter a start date and end date for the data they wanted to see, but what I need to do is look at all calls in hour blocks throughout every day from 7AM to 6PM. So if they entered a start of "3-1-2010" and end of "3-5-2010", I had no idea how to gather all 5 dyas of just the 7 to 8, 8 to 9...........and display the counts for each.

I completely understand how that would work if I restrcted the user to a choice of only one day, but multiple days confused me. So I decided to show the data by a given month.

Thank you for the code example! That''s exactly what I was looking for. I''ll check out your link! I''m sure I''ll learn a lot!!!!


Stewert,


我用不同的方式去了解它。我现在让用户输入开始和结束日期。然后我每小时都有Dcounts。问题如下:

如果用户输入3-1-2010到3-5-2010,我的每小时计数代码将计算从3-1到2010的总呼叫数:上午00点至3-5点,上午8点。我需要它来计算每天上午7:00到8:00插槽。


所以我认为我需要一种方法对字段进行排序ChangeDate在按小时查询。这样,返回的所有数据将按一天中的小时排序。


有关如何完成此操作的任何建议吗?目前我对ChangeDate有以下标准:

Stewert,

I went about it a different way. I now have the user enter a start and end date. I then have Dcounts for every block of hour. The problem is the following:
If the user enters 3-1-2010 through 3-5-2010, my code that counts each hour will count the total calls from 3-1-2010 from 7:00 AM to 3-5-2010 at 8:00 AM. I need it to count each days 7:00 to 8:00 AM slot.

So I figured that I need a way to sort the field "ChangeDate" in the query by the hour. That way, all the data returned will be in order by hour of the day.

Any suggestions on how to accomplish this? Currently I have the following criteria for "ChangeDate":

展开 | 选择 | Wrap | 行号


这篇关于具有基于时间的特定标准的Dcount ...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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