473,663 Members | 2,743 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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]","qryTotalscra tched","[resultid] in (6,7,8,9) and
[calldate] between #01/01/2001# and " & [calldate])
I also tried:
=Dcount("[callid]","qryTotalscra tched","[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 1742
You put date delimiters around 1/1/2001, but not around [calldate].

=Dcount("[callid]","qryTotalscra tched","[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]","qryTotalscra tched","[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********@hot mail.com> wrote in message
news:11******** **************@ u72g2000cwu.goo glegroups.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]","qryTotalscra tched","[resultid] in (6,7,8,9) and
[calldate] between #01/01/2001# and " & [calldate])
I also tried:
=Dcount("[callid]","qryTotalscra tched","[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]","qryTotalscra tched","[resultid] in (6,7,8,9) and
[calldate] between #01/01/2001# and " & [calldate])
I also tried:
=Dcount("[callid]","qryTotalscra tched","[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 qryTotalscratch ed
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
5576
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 button on another form (frmEmpList) which has a list box that contains the names of all employees. When a name is selected in the list box and the button is clicked, frmVacationWeeks opens and is filtered using the following: ". IN (" & Left(strSQL,...
4
7535
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 requirements to work and have tried a number of different formats. At the moment I am getting an object required error message. This is the current code: Function UpdateDistributionCost(Suff As String) ' adds new record if none exists, prompting...
6
3313
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 parameter query which is the recordsource for the report. The parameter is <=. The query returns the correct amounts upto the date entered (no need for "between" dates here). There are 8 textboxes with dcounts; 2 other boxes Sum some of these
2
1940
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
2958
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 it. Simple database: I want to have a user enter Supply Orders (just for tracking purposes) by Item. The user may also enter a new item - "new" is a combination of Item, PartNumber and Vendor - they could have the
1
1992
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 QueryName is the name of the parametered Query. However, when I go to Print Preview, instead of giving the count Access simply displays "#ERROR" I'm pretty sure that the problem comes from the fact that the query has parameters. When I tested the same...
2
7937
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 perform are either Clean, Shampoo or Vacuum. I have a query called Details that shows a history of all the jobs they have performed. On my report I want a total for each employee of how many of each job they have performed. This is what I know of...
5
6146
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 Name is already in use." , vbExclamation, "Error" Me!.SetFocus End If
2
2529
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("", "Qry_DueProjects") 0 Then DoCmd.RunMacro "TodayProjectsEmail"
0
8436
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8345
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8548
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7371
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5657
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4182
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2763
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2000
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1757
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.