Rabu, 19 Juni 2013

RE: [MS_AccessPros] DCOUNT For a Fiscal year.

 

Art-

Try this:

StatusDate BETWEEN IIF(Month(Date())<10, DateSerial(Year(Date())-1, 10, 1),
DateSerial(Year(Date()), 10, 10)) AND IIF(Month(Date())>9,
DateSerial(Year(Date())+1, 9, 30), DateSerial(Year(Date()), 9, 30))

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Art
Sent: Thursday, June 20, 2013 5:05 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] DCOUNT For a Fiscal year.

I have the DCOUNT statement that brings back a count from 01/01/13 to
12/31/13:

=DCount("ApplicationID","qryWaitingListCurrentMonth"," StatusDate Between
DateSerial(Year(Date()),1,1) and DateSerial(Year(Date()),12,3)

This works right as is as far returning the count but it actually needs to
bring back the count from 10/01/12 to 09/30/13 which is our fiscal year.

This is the query that supports it:

SELECT tblApplicationStatus.StatusDate,
tlkpApplicationStatusType.ApplicationStatusTypeName,
tblApplicationStatus.ApplicationID
FROM tblApplicationStatus INNER JOIN tlkpApplicationStatusType ON
tblApplicationStatus.ApplicationStatusTypeID =
tlkpApplicationStatusType.ApplicationStatusTypeID
WHERE (((tblApplicationStatus.ApplicationStatusTypeID)=3));

Any ideas how I can achieve this?

Thanks you,

Arthur Lorenzini
Sioux Falls,SD

------------------------------------

Yahoo! Groups Links

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)
.

__,_._,___

Tidak ada komentar:

Posting Komentar