473,804 Members | 3,748 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calculated Control using 3 criteria including dates

I need to create a calculated control which will count the number of cases [caseid] if the [casestatus] is "open" and the [casetype] is "a" for a calendar quarter.

I have been struggling with which formula would work best:
dcount
dsum
sum(iif())

What I have working so far:
=DCount("[caseid]","[qryCaseinfo]","[casetype]='a' AND [casestatus]='open'")

Now I need to work in the Calendar Quarter, and I keep getting stuck. Any assistance - or alternate suggestions would be appreciated.

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #1
2 1378
On Thu, 27 Jan 2005 17:40:30 GMT, Samaba via AccessMonster.c om wrote:
I need to create a calculated control which will count the number of cases [caseid] if the [casestatus] is "open" and the [casetype] is "a" for a calendar quarter.

I have been struggling with which formula would work best:
dcount
dsum
sum(iif())

What I have working so far:
=DCount("[caseid]","[qryCaseinfo]","[casetype]='a' AND [casestatus]='open'")

Now I need to work in the Calendar Quarter, and I keep getting stuck. Any assistance - or alternate suggestions would be appreciated.


=DCount("*","[qryCaseinfo]","[casetype]='a' AND [casestatus]='open'
AND DatePart("q",[DateField]=1")
Change the 1 to the quarter number wanted.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #2
Thank you for your quick answer!

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #3

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

Similar topics

5
2927
by: Richard Holliingsworth | last post by:
Hello: Thanks for reading this post. I need to create a metrics (form or report - I don't care which) to display calculated fields about the database (A2002 front end to SQL Server 2K) 1) I can't seem to enter SQL straight into the control 2) I tried entering things like (in the control) =COUNT( =
1
5392
by: Miguelito Bain | last post by:
hi everybody. i'm trying to find out what you can and can't do with/in calculated fields. any help, pointers, and/or advice would be greatly appreciated. i'm a newbie, but i want to learn, and i've tried a lot before posting. here's my situation. i have a simple form with dates on it. i have an indate and outdate
6
1954
by: Megan | last post by:
Hi everybody- I'm trying to use a checkbox to control whether or not a date field in a query "Is Null" or "Is Not Null." I have 2 date fields: InDate and OutDate. If there is an OutDate, then the record is finished. If there is no OutDate, then the record is not finished. I'm using an unbound form (frmStatus) to enter data into a query to
2
2320
by: Norbert Lieckfeldt | last post by:
I am setting up a database for a friend who's an Optician, using MS Access 2002. All seems to be working well, but I have hit a snag. There's a calculated field both in a form and a query which calculates the date for the next appointment from a date field and the number of months to the next appointment. That works fine. For reminder letters, I need to have a query which allows me to select a subsection of dates between dd/mm/yyyy...
12
6395
by: Steve Elliott | last post by:
I have a query set up to gather together data between two specified dates. Shown in the query column as: Between #24/09/2004# And #01/10/2004# Is it possible to enter several different date ranges, ie between 24/09/2004 and 01/10/2004 together with 05/10/2004 and 07/10/2004 ? If I enter the "Between" criteria on different lines it returns no data.
3
2912
by: Afton | last post by:
I would like to make a form that filters a report by Supervisor and by starting and ending date. I have the supervisors in a combo box, and that works. However, I do not know how to code to let the user enter a starting and ending date and only show the records between those dates. The code that I have so far does not work for the dates, but I'm including it anyway so you show me what to change. Thanks so much! :) Here is my code (the...
0
2125
by: trishbarker | last post by:
I've created a simple select query in Microsoft Access wherein I'm searching all records based on the "Final Payment Due Date". The Final Payment Due Date is a calculated expression based on two other fields. In the criteria for the calculated expression I've entered "Between and " so that the user can return all reservations for which final payment is due for the entered period of time. For some bizarre reason, if the user enters,...
2
5546
by: jcf378 | last post by:
hi all. I have a form which contains a calculated control ("days") that outputs the # of days between two dates (DateDiff command between the fields and ). However, when I click "Filter by Form" in order to search for records based on this form, I would like to be able to enter a value in this "days" control so that I can filter records on the form based on this calculated interval (i.e., i want to search for records specifically where...
23
7145
by: Steven TK | last post by:
Hi everyone, I wonder who can help me on the filter the Start Date and End Date. I still cannot manage to filter it. Eg. When the user click the StartDate(comboBox as 16/7/07), the Start Date(textbox should show only 16/7/07) and this also apply to the EndDate. Private Sub cboStartDate_Click() 'Purpose: Build up the criteria string form the non-blank search boxes, and apply to the form's Filter. 'Notes: 1. We tack " AND " on the end...
0
9584
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,...
0
10337
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10323
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,...
1
7622
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6854
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
5525
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...
0
5654
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
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
3822
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.