DCount函数中的多个标准 [英] Multiple Criteria in DCount Function

查看:92
本文介绍了DCount函数中的多个标准的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我最近刚开始担任一家大公司的报告分析师。我被要求处理一个项目,我将数据从Outlook导入Access,并获取发送给每个员工的电子邮件数量。我创建了一个组合框,其控制源设置为:


= DCount(" [To]"," Inbox"," [To] =''Firm ABC ''"&" Datepart(''d'',[Received])= Datepart(''d'',Today())")


[To ]和[已接收]是名为收件箱的表格中的列。 [已收到]采用日期格式。基本上我在这个功能中尝试做的是在打开报告时计算当前日期公司ABC的电子邮件数量。我几乎尝试过所有事情(例如& [Received] = Today())。任何建议或帮助将不胜感激!


谢谢

Hi there,

I recently started as a reporting analyst for a large firm. I was asked to work on a project where I import data from Outlook into Access and get a count of emails sent to and from each individual employee. I created a combo box with the control source set as:

=DCount("[To]","Inbox","[To]= ''Firm ABC''" & "Datepart(''d'',[Received])=Datepart(''d'',Today())")

[To] and [Received] are columns in a table named "Inbox". [Received] is in a date format. Essentially what I am trying to do in this function is to count the number of emails from ''Firm ABC'' on the current date when you open the report. I have tried almost everything (ex. "& [Received]=Today()"). Any suggestions or help would be greatly appreciated!

Thanks

推荐答案

尝试更改今天 (AFIK这不是Access认可的一个词)到日期()


为什么这是一个组合框?我认为它应该是一个文本框


另一个问题是它是硬连线的。因为你只能从公司公司ABC那里获取信息,而不是来自公司XYZ

我怀疑你应该看看2个输入框(在公司的情况下,它可能是组合框),1选择日期,另一个选择你需要统计数据的公司。


Phil
Try changing "Today" (AFIK This is not a word recognised by Access) to Date()

Why is this a Combo Box? I think it should be a Text Box

A further problem is that it is "hard wired" in that you can only let information from Company "Firm ABC", not from Firm XYZ

I suspect you should be looking at 2 input boxes (in the case of the firm, it might be Combo box), 1 to select the date and the other to select the firm whose statistics you need.

Phil


谢谢你回复菲尔!我将其更改为文本框并将公式更改为Date(),但它返回#Error值。我现在要尝试2盒方法。我将使用查询来在[开始日期]和[结束日期]之间进行操作。作为标准。有关如何创建一个函数的想法,该函数将使用特定公司的组合框查找日期范围并计算多少次调用?


再次感谢,


Eric
Thank you for replying Phil! I changed it to a text box and changed the formula to Date(), but it is returning an #Error value. I am now going to try the 2 box method. I am going to use a query to do "between [start date] and [end date]" as criteria. Any idea on how to create a function that will use a lookup for the combo box of a specific firm for the date range and count how many calls?

Thanks again,

Eric


嗨Eric,


我们必须轻轻地开始。


您是否有一个至少包含公司名称的表和一个像FirmID和电子邮件日期一样的自动编号?


如果没有,你的桌子是什么样的?


Phil
Hi Eric,

We have to start gently.

Do you have a table containing at least the Firm''s name and an AutoNumber filed like FirmID and the Email date?

If not, what is your table like?

Phil


这篇关于DCount函数中的多个标准的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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