DSum功能 [英] DSum function

查看:73
本文介绍了DSum功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我正在尝试编写一个函数,该函数会将Credit Hours查询中的Hours列与用户定义的日期范围相加。这是我到目前为止的功能。


= DSum([小时],学分时间,日期> = [输入开始日期(MM) / DD / YY)]< = [输入结束日期(MM / DD / YY)]")


好​​像它应该可以工作,但我一直在#错误。我的功能出了什么问题?我一直在试着把头发拉出来。


谢谢,


查理

Hello,

I''m trying to write a function that will sum the Hours column in the Credit Hours query for a user defined date range. This is the function that I have so far.

=DSum("[Hours]","Credit Hours","Date>=[Enter Start Date (MM/DD/YY)] And <=[Enter End Date (MM/DD/YY)]")

It seems like it should work, but I keep getting a #Error. What is wrong with my function? I have been pulling my hair out trying to figure this out.

Thanks,

Charlie

推荐答案


您好,


我正在尝试编写一个函数,它将在信用小时查询用户定义的日期范围。这是我到目前为止的功能。


= DSum([小时],学分时间,日期> = [输入开始日期(MM) / DD / YY)]< = [输入结束日期(MM / DD / YY)]")


好​​像它应该可以工作,但我一直在#错误。我的功能出了什么问题?我一直想把头发拉出来。


谢谢,


查理
Hello,

I''m trying to write a function that will sum the Hours column in the Credit Hours query for a user defined date range. This is the function that I have so far.

=DSum("[Hours]","Credit Hours","Date>=[Enter Start Date (MM/DD/YY)] And <=[Enter End Date (MM/DD/YY)]")

It seems like it should work, but I keep getting a #Error. What is wrong with my function? I have been pulling my hair out trying to figure this out.

Thanks,

Charlie



以下哪一项都有效?

Either of the following will work?

展开 | 选择 | Wrap | 行号


Mary,


感谢您的回复和查看我的问题。我尝试了这两个公式,都给了我一个#Error。有没有什么我必须改变文本框的特点?另外,我注意到[Enter]框前面和后面的#符号。他们进入的不是一个数字。是否有某种符号可以代表日期而不是数字?还有什么我可以做的吗?


非常感谢,


查理
Mary,

Thanks for the response and for looking into my problem. I tried both of those formulas and both gave me a #Error. Is there something I have to change in the text box characteristics? Also, I noticed the # signs in front and at the end of the [Enter] boxes. What they''re entering isn''t a number. Is there some kind of symbol that could represent a date rather than a number? Is there anything else I can do?

Thanks so much,

Charlie


你好查理


我知道它没有意义,但#是Access中的日期表示。

规则


字符串/文字 - 单引号环绕

日期 - 环绕#

数字 - 无需符号

您正在计算小时数,因此文本框需要是一个数字而不是日期/时间格式,因为Access无法及时计算超过24小时。一旦你有了这个号码,我们就可以提供公式来显示小时数。


你是否被要求提供日期参数,你是否按照我的方括号将日期字段括在方括号中例。在访问日期是一个返回当前日期的函数,您需要将其括在方括号中,将其指定为字段。理想情况下,更改此字段的名称是个好主意。


Mary


Hi Charlie

I know it doesn''t make sense but # is the date representation in Access.

Rules:

String/Text - surround with single quotes
Date - surround with #
Number - no symbol required

You are summing the number of hours so the text box needs to be a number rather than a date/time format as Access cannot calculate in time beyond 24 hours. Once you have the number we can provide the formula to show the number of hours.

Are you being asked for the date parameters and did you enclose the date field in square brackets as per my example. In access Date is a function that returns the current date and you need to designate it as a field by enclosing it in square brackets. Ideally it would be a good idea to change the name of this field.

Mary



Mary,


感谢您的回复和调查我的问题。我尝试了这两个公式,都给了我一个#Error。有没有什么我必须改变文本框的特点?另外,我注意到[Enter]框前面和后面的#符号。他们进入的不是一个数字。是否有某种符号可以代表日期而不是数字?还有什么我可以做的吗?


非常感谢,


查理
Mary,

Thanks for the response and for looking into my problem. I tried both of those formulas and both gave me a #Error. Is there something I have to change in the text box characteristics? Also, I noticed the # signs in front and at the end of the [Enter] boxes. What they''re entering isn''t a number. Is there some kind of symbol that could represent a date rather than a number? Is there anything else I can do?

Thanks so much,

Charlie


这篇关于DSum功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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