473,396 Members | 1,935 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

problems with dcount please help

Hello I am trying to create dcount field but is not working I have
tried every way possible and I can't get it to work. here is my code:

=Dcount("[callid]","qryTotalscratched","[resultid] in (6,7,8,9) and
[calldate] between #01/01/2001# and " & [calldate])
I also tried:
=Dcount("[callid]","qryTotalscratched","[resultid] in (6,7,8,9) and
[calldate] <= " & [calldate] the end result that I am
looking for in my report:

3/1/06 Calls: 10 contacts: 3 Scratched: 1 Cummulative: 1
3/2/06 Calls: 15 contacts: 4 Scratched:2 Cummulative: 3
Cummulative is the tricky part, and I am trying to do a dcount on that
field. Thanks for any help in advance.

Mar 21 '06 #1
2 1726
You put date delimiters around 1/1/2001, but not around [calldate].

=Dcount("[callid]","qryTotalscratched","[resultid] in (6,7,8,9) and
[calldate] between #01/01/2001# and #" & [calldate] & "#")

If you don't use the US format for dates, you'll also need to format the
date to the US format. 1/1/2001 won't matter since the day and month are the
same, but for [calldate] it might make a difference. If you need it, that
would then be:

=Dcount("[callid]","qryTotalscratched","[resultid] in (6,7,8,9) and
[calldate] between #01/01/2001# and #" & Format([calldate], "mm/dd/yyyy") &
"#")

--
Wayne Morgan
MS Access MVP
"Kaspa" <ka********@hotmail.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
Hello I am trying to create dcount field but is not working I have
tried every way possible and I can't get it to work. here is my code:

=Dcount("[callid]","qryTotalscratched","[resultid] in (6,7,8,9) and
[calldate] between #01/01/2001# and " & [calldate])
I also tried:
=Dcount("[callid]","qryTotalscratched","[resultid] in (6,7,8,9) and
[calldate] <= " & [calldate] the end result that I am
looking for in my report:

3/1/06 Calls: 10 contacts: 3 Scratched: 1 Cummulative: 1
3/2/06 Calls: 15 contacts: 4 Scratched:2 Cummulative: 3
Cummulative is the tricky part, and I am trying to do a dcount on that
field. Thanks for any help in advance.

Mar 21 '06 #2
Kaspa wrote:
Hello I am trying to create dcount field but is not working I have
tried every way possible and I can't get it to work. here is my code:

=Dcount("[callid]","qryTotalscratched","[resultid] in (6,7,8,9) and
[calldate] between #01/01/2001# and " & [calldate])
I also tried:
=Dcount("[callid]","qryTotalscratched","[resultid] in (6,7,8,9) and
[calldate] <= " & [calldate] the end result that I am
looking for in my report:

3/1/06 Calls: 10 contacts: 3 Scratched: 1 Cummulative: 1
3/2/06 Calls: 15 contacts: 4 Scratched:2 Cummulative: 3
Cummulative is the tricky part, and I am trying to do a dcount on that
field. Thanks for any help in advance.


Kaspa,

[calldate] between #01/01/2001# and " & [calldate])

doesn't make much sense. Just a guess here, perhaps you want something
along the lines of:

SELECT Count(callid)
FROM qryTotalscratched
Where resultid in (6,7,8,9)
Group By calldate

If that doesn't help, perhaps you should describe in more detail what
you are trying to achieve.

--
Randy Harris
tech at promail dot com
I'm pretty sure I know everything that I can remember.
Mar 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: jdph40 | last post by:
I posted this problem previously and received excellent help from Wayne Morgan. However, I still have an unanswered question. My form (frmVacationWeeks) is opened from the OnClick event of a...
4
by: Will | last post by:
Hi, I had a DCount within a module on records in a table where CustSuffix = 0. I now need to DCount where CustSuffix = 0 and the type of cost Suffix (Suffix in table) = G. I can't get both...
6
by: Mike Conklin | last post by:
This one really has me going. Probably something silly. I'm using dcount for a report to determine the number of different types of tests proctored in a semester. My report is based on a...
2
by: Paul T. RONG | last post by:
Hi, I have a problem with DCount, the following code doesn't work: DCount("", "qryOrder", "( = Me! AND = 'drink')" > 0 Please help. Thank you.
15
by: sara | last post by:
Hi I'm pretty new to Access here (using Access 2000), and appreciate the help and instruction. I gave myself 2.5 hours to research online and help and try to get this one, and I am not getting...
1
by: highbulp | last post by:
I'm trying to use the DCount() function in the Report Header of a new report. The ReportSource for this report is a parametered Query. My DCount call looks like: DCount("","","=1") where...
2
by: Wingz | last post by:
Hiya, Fairly new to Access and was wondering what the best way to perform Dcounts on groups in an Access report. For example, I have 10 employees and the different instances of jobs they can...
5
by: Wayne | last post by:
I'm using the following code to check for duplicate names when I exit the field "MemberName" on a form: If DCount("*", "tblMembers", " = '" & Me! & "'") <0 Then DoCmd.CancelEvent MsgBox "This...
2
by: dan.cawthorne | last post by:
Need Some Help, In Modifing this Bit of VBA Code, This the code i use and it works but i want it to go one step further in on the open event of my main start up form If DCount("",...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.