Sort Records Based On Fiscal Year

Oct 14, 2005

I would like to sort records based on fiscal year for a chart. The fiscal year would be 7/01/2003 to 06/30/2004. I would like to sort this based on oldest date to newest date. This query could span several fiscal years. Any help would be greatly appreciated.

View Replies


ADVERTISEMENT

Queries :: Sort Out Invoices By Year - Query Based On Combo Box To Show All Records

Mar 4, 2015

I am trying to have a query sort out my invoices by year but also to have the possibility to show all invoices.

I have one table "INVOICE" where I have a column "YEAR" calculated with DatePart function from the invoice date.

On my form "INVOICE LISTING", I want to have a combox "Combo957" selecting the year. I have forced the "ALL" selection to the combox using a UnionQuery.

My problem, I cannot get the query to work. I have tried many ways, the closest I can get is :

IIf([Forms]![Invoice Listing]![Combo957]="ALL",([Invoice].[Year])<Year(Date()),[Forms]![Invoice Listing]![Combo957])

If I select the year from the combo, it works, if I select "ALL" nothing is shown.

here is the full SQL

SELECT DISTINCTROW Companies.Company, Companies.City, Companies.Country, Sales.Brand, Sales.Type, Sales.Date, Sales.QuoteNo, Sales.Delivered, Sales.Account, Sales.Branch, Invoice.InvoiceNumber, Invoice.InvoiceDate, Invoice.CustOrderNumber, Invoice.PaymentTerms, Invoice.DueDate, Invoice.NetAmount, Invoice.TotalAmount, Invoice.Tax, Invoice.PaiementRCVD, Invoice.Overdue, Invoice.Month, Year([Invoice]![DueDate]) AS DueYear, [Invoice]![month] & " - " & [Invoice]![Year] AS InvoiceMonth

[Code] .....

View 5 Replies View Related

Queries :: Grab Custom Fiscal Year Count Based On System Clock Date

Aug 13, 2015

How do you grab a custom Fiscal Year's values based on the system clock's date?

I am building a query where I want to see the number of closed cases based on the current custom fiscal year with the system clocks date. The report that it feeds only cares about the current FY.

I need the System Clock's FY value in this query

Code:
SELECT shortname AS Station, NZ(TotalCount.TotalCases,0) AS [Cases Complete]
FROM StationList LEFT JOIN (SELECT station, count([Open Issues].ID) AS TotalCases FROM [Open Issues] WHERE [Status]="Closed" GROUP BY Station) AS TotalCount ON StationList.shortname =TotalCount.station;

Within the Query Open Issues I have the FY broken up

Code:
fiscalYear: IIf(Month([Issues].[Opened Date])>=10,"FY" & Year(DateAdd("yyyy",1,[Issues].[Opened Date])),"FY" & Year([Issues].[Opened Date]))

View 4 Replies View Related

HELP: Changing Dates To FY (fiscal Year) And YTD (year-to-date) Values

Apr 25, 2006

I have a huge table with transaction dates. I need to slice and dice
this data (sum, %'s, etc), but group by FY. Our fiscal year is from
7/1 thru 6/1.

For example:
1/8/2004 = FY 2004,
8/12/2004 = FY 2005,
2/3/2006 = FY 2006

THEN . . . . I need to also isolate certain periods, for example July-
March for YTD (year-to-date) analysis and compare YTD of 2006 with that
of 2005.

What do you suggest? Many thanks.

Mehran

View 7 Replies View Related

Fiscal Year Reporting

Feb 2, 2006

I want to create reports for each year my company is in business but by my fiscal year Oct - Sept instead of then normal Jan - Dec. any ideas?

Thanks in advance

View 2 Replies View Related

Fiscal Year Query Problem

Dec 12, 2006

Here's my code for the fiscal year

Year([ValueDate])-IIf([ValueDate]<DateSerial(Year([ValueDate]),11,1),1,0)+1 AS FYear

No matter what date it reads from "ValueDate" it returns 1905
eg 11/01/2000 returns 1905
12/01/2003 returns 1905

When I click in the field of each record the date is displayed
11/01/2000 FYear displays 06/23/1905
12/01/2003 FYear displays 06/26/1905

Any ideas what I'm doing wrong?:confused:

View 2 Replies View Related

Financial (Fiscal) Year Field

Jan 25, 2007

I have created a query in Access 2000 which contains a date field in short date format.

I would like to add a field to this query which calculates the financial (fiscal) year from my date field. Our financial year runs from Apr 1st to Mar 31st.

I'm totally stuck - any ideas would be greatly appreciated!!

View 3 Replies View Related

Fiscal Year Formula But With A Error

Oct 1, 2007

Our physical year starts 10/01. This is what I have for the criteria, but I still getting a error. Can anyone tell me where Iam going wrong.

FYear: Year([Award Dtd])-IIf([Award Dtd]< _ DateSerial(Year([Award dtd]),10,01),1,0)

View 14 Replies View Related

Calculating Fiscal Year Total

Nov 4, 2004

I need to provide a report on data over a fiscal year that has the following format:

apr 03
may 03
jun 03
q1 total
jul 03
aug 03
sep 03
q2 total
oct 03
nov 03
dec 03
q3 total
jan 04
feb 04
mar 04
q4 total
year total

I can group by quarter and sum() in the group footer which works, but when I group by year I get totals for 03 and 04 separately. I have also tried sum() and dsum() in the page footer, which gives #error, and vba in page footer:

Dim pageTotal As Long
Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
' Add to Page Total
pageTotal = pageTotal + Me![ClientsServed]
End Sub
Sub PageFooter_Print(Cancel As Integer, PrintCount As Integer)
' Show Page Total Price
Me![yrClientsServed] = pageTotal
End Sub

which calculates properly in the detail section (var watching "pageTotal") but outputs nothing in the footer, though the name of the text box in the footer is correct.
If anyone can see an error in what I'm doing or suggest another approach, I would really appreciate it, this is driving me nuts.

View 1 Replies View Related

Create A Fiscal Year Expression

Jul 9, 2006

I'm trying to change the way date calculations are done in a training db. I show them now in an expression in my query as Between Date() And Date()-365, but I need to show them based on a FY beginning 7/1 of any year and ending on 6/30 of any year. Any suggestions?

View 1 Replies View Related

Queries :: Number Of Pay Periods In A Fiscal Year

Jan 23, 2014

If my fiscal year ends 12/31 but the pay period doesn't end until 1/10, how do I get a query to tell me there are 25.3 pay periods remaining (counting from the last pay period 1/11)?

View 3 Replies View Related

Modules & VBA :: DCount With Custom Fiscal Year

Jan 21, 2014

I have having an issue with determining how to use a customized fiscal year with a DCount function.

My Code:

ThisYear: DCount("*","Open Issues","year([RequestDate]) = " & Year(DateAdd("y",-1,Date())))

The code only does from Jan 1, YYYY TO Dec 31, YYYY

I'd like the code to read from Oct 1, YYYY TO Sept 30, YYYY

View 2 Replies View Related

Creating Fiscal Quarters And Year In Queries

Aug 26, 2011

So far, in my query, I have a column for Quarters and under the field of that column I have put a statement:

Quarter: IIf(Month([VisitDate]) In (4,5,6),"1",IIf(Month([VisitDate]) In (7,8,9),"2",IIf(Month([VisitDate]) In (10,11,12),"3","4")))

The statement works fine but the problem is it does not tell me which year of does that quarter belongs to. Example: whether it is Quarter 1 of 1999 or Quarter 1 of 2000. Right now it only output either 1 or 2 or 3 or 4.Therefore, is there a way where I can command to give me an output like "Quarter 1, 1999", "Quarter 2, 1999", "Quarter, 1, 2000". Basically with respect to the Year that I have in my data?

View 14 Replies View Related

Lookup Table Fiscal Year - Getting 0 Back

Feb 8, 2012

I was trying to do this in a SQL Q but thought it would be easier to do multiple calculations in my form if I used Calculated Controls instead.

I have a table Lookup_Tbl_Fiscal_Year with Start_Date, End_Date and FSA_FY.

In my form I want to take the date entered in Last_Signature_Date and look up the FSA_FY.

The Last_Signature_Date would fall somewhere between the Start & End dates.

Here is what I got but no matter what date I enter I get 0 back.

=Nz(DLookUp "[FSA_FY]","[Lookup_Tbl_Fiscal_Year]","[Last_Signature_Date]">="[Start_Date]" And "[Last_Signature_Date]"<="[End_Date]"),0)

I read that this might slow down the system. Is it better to use SQL?

View 14 Replies View Related

Conditional Formatting Of Dates By Fiscal Year?

Mar 30, 2015

I've got the conditional formatting thing down and am able to determine if a date is close to expiring by using 'value is less than now()+30', but I'd like to replicate the same thing, but the expiration date is based on the fiscal year (October to October).

The date entered is the date of qualification. How can I conditionally format to fit my needs?

View 3 Replies View Related

Queries :: Calculating Fiscal Year Sales In A Query

Feb 18, 2015

I'm making a query that has the following Fields

Product (Table PDZRN1)
Whse (Table PDZRN1)
Description (Table PDZRN1)
On Hand (Table PDZRN1)
Unit Cost (Table PDZRN1)
Unit Price (Table PDZRN1)
LastDate: Date (Table Sales_History) (using the Max function)

Where I am stuck is I want 4 additional columns to pull the last 3 fiscal years and total sales for each Product for the 3 previous fiscal years. The Field with sales amount is "Sales" it is located in Table "Sales_History", and the dates for the invoices are in the field "Date". I tried the following query, but I'm sure it didn't work because I failed to push the data back to the date field:

Field - FY2013Sales: Sales
Table - Sales_History
Total - Sum
Criteria - <= 04/01/2012 and <= 03/31/2013

how to link my criteria back to the "Date" field, or if I'm even going down the write path.

View 14 Replies View Related

Queries :: Calculate Fiscal Year And Month From A Date

Jul 13, 2015

I want to build a query that calculates the fiscal year and the month from a date on-the-fly. I tried to do it in VBA, but it's more complicated than in query I guess. So this is my table:

The date is on the left, in the middle I want to have calculated Jan 14 and on the right I want 14/15.

In VBA I started with this: strMonth = MonthName(Month(A), True) & " " & Format(A, "YY") which gave me "Jan 08". But the date was hard-coded and not from my table. Then I tried to store the information by SQL statement into a string. But this also didn't work, the types were different.

Code:
UPDATE tblSAPOD
SET sapOD_month = Year([sapOD_OrderDate])-IIf([sapOD_OrderDate]<
DateSerial(Year([sapOD_OrderDate]),6,16),1,0)
WHERE sapOD_OrderDate Like "*/*/94";

.. but I guess it's wrong, it gives me a syntax error.

View 11 Replies View Related

Queries :: Running Total Query Not Calculating First Fiscal Year

Aug 5, 2014

I am trying to create a running total query that aggregates project funding by fiscal year. The fiscal year is calculated based on a date time field that is never null. The totals field comes from 2 different number fields that are either 0 or > 0. The query is going to be linked to by Excel, so I have to do the running total in the query itself, vs. a report.It is close to working, except that it is not totalling the first fiscal year. The output surrently looks like this:

FYear BudgetedCostIndCont Commitment
2010
2011 8585643 4742000 3843643
2012 2297116511432165 11539000
2013 3618726216963282 19223980
2014 4457769020706644 23871046
2015 4963815023206644 26431506

As you can see, the first row for FY 2010 is blank. I know there is data there, as this query is fed by a subquery that selects these rows based on contract signed date. Below is the SQL of each query:

Code:
SELECT Year([DateContractSigned])-IIf([DateContractSigned]<DateSerial(Year([DateContractSigned]),4,1),1,0)+1
AS FYearExport
FROM tblProject
GROUP BY Year([DateContractSigned])-IIf([DateContractSigned]<DateSerial(Year([DateContractSigned]),4,1),1,0)+1, tblProject.ProjID, tblProject.FPAccepted
HAVING (((tblProject.FPAccepted)=True));

and the Aggregate query:

Code:
SELECT qryDashboardChart1.FYearExport,
DSum("[BudgetedCost]","tblProject","Year([DateContractSigned])<=" & [FyearExport]-1 & "")
AS RunTotBudgetedCost, ([RunTotBudgetedCost]-[RunTotTECTERRACommitment])

[code]....

I should also mention that I cannot implement the NZ() function, as Excel balks at this when trying to link to Access queries.

View 8 Replies View Related

Unable To Remove Duplicate Information For One Fiscal Year In ODBC

Aug 25, 2014

Issue: We are trying to remove duplicate information for one fiscal year in an ODBC then import and append the correct information from an Excel spreadsheet. The process we have followed is

Copy Master Access file and paste new file (to test, so we do not loose original data)Rename new file TEST.accdbCreate a delete query for Fiscal Year dataDelete information for duplicated Fiscal yearImport correct Fiscal Year information to a new table from ExcelAppend table to master table (ODBC)

Questions:

After being granted permission to delete information, it worked once and now no longer works. When the permissions are reviewed it appears that everything is still granted but the following message is received:

Why does Access change all copies of SDA, even if filenames are different and in different folders?

When we append table, why does it duplicate information?

View 1 Replies View Related

Queries :: SELECT Records From A Table Based On IN Clause And Sort Them In Order

Jan 4, 2014

WinXPPro Sp3
Access 2007

After some research I thought I had found a neat way to SELECT records from a table based on an 'IN' clause and sort them in the same order as the values for the 'IN' clause... i.e.

Code:
SELECT Unique_No, Table_Name, List_Order FROM My_Table
WHERE Table_Name = 'Titles'
AND List_Order IN (3,1,15,4,5,12,7,2)
ORDER BY INSTR('3,1,15,4,5,12,7,2', List_Order)

Unfortunately, this returns list_order 5 just after 15 and list_order 2 just after 12, thus

List_Order
3
1
15
5
4
12
2
7

View 3 Replies View Related

Number Fields In Text To Number Field, Formula For Fiscal Year

Nov 26, 2004

Date of Birth (DOB) field etc. in one program are text - how do I make another file with the same data into number fields for Date of Birth field etc? When I copy data to file that has number fields the 09252004 is changed to 9252004. Can I get reports with the correct Date of Birth in them by moving data from text file to number file?

There is data entered monthly in file and formula has been set up for January, February etc as ---quarter: Int(([month]-1)/3)+1. I would like formula for the fiscal year for April to be counted as month 1, May - month 2, June as month 3, July as month 4, August as month 5, Sept as month 6, October as month 7, Nov as month 8, Dec as month 9, Jan as month 10, Feb as month 11 and March as month 12.

Thank you

View 6 Replies View Related

Sort Date Formatted As Year And Week

Dec 7, 2004

I have a table with sales by day. I want to display the data in a graph summarised by week but the period spans several years. If I format the date thus Format(MyField,"yyyy ww") then Access sorts the results thus 2003 1, 2003 10, 2003 11 but it should be 2003 1, 2003 2, 2003 4 etc.

How can I get Access to sort in ascending order correctly on the formatted date?

Thanks

View 2 Replies View Related

Queries :: Sort By Year Is Sorting By Month

Sep 16, 2013

I've created a query based on 2 other queries.

I then filter the results of the third query based on 2 dates.

This worked great for 2013.

As a test I started making some records for 2014 and I've now found that my third query is not filtering the dates properly.

The filtering is happening based on date fields that contain only month and year eg: "09-2013".

My problem is that when I try to filter for records in 2014 it brings up results for 2013 as well.

If for example I had a record in August 2013, September 2013 and August 2014.

The sort would be:

08-2013
08-2014
09-2013

NOT:

08-2013
09-2013
08-2014

How do I make the sort apply to month then year to get the correct results returned?

View 6 Replies View Related

Forms :: Auto Generate File Number Based On Number Of Records In Year

Jan 21, 2014

I have a form [IUDATA]

I have a add record button.

I have a date field [DATEIN]

I have a text field [DRPNO]

If the [DPRNO] field is empty, I would like the user to have the [DPRNO] field be automatically populated after the user enters a date.

I'd like the format of [DPRNO] to be "dpr YY-XXX"

Where:
YY is the year of the [DATEIN] field and
XXX is number of records in that year.

So for example, if it was the 4th record with a 2013 date the [DPRNO] would be dpr 13-004.

View 12 Replies View Related

Queries :: End Of Year Age Based On A Date

May 15, 2014

I have a date of service [DOS] and a date of birth [Birth Date]

I'm trying to calculate the age at the last day of the date of service year not the current year.

Example:
[Birth Date] = 6/25/1993
[DOS] = 10/18/2013
Age at the last day of the date of service year (12/31/2013) = 20

How to do this. I tried

Code:
DateDiff("yyyy",[BIRTH DATE],[DOS])+Int(Format([DOS],"mmdd")<Format([BIRTH DATE],"mmdd"))

but this does not work correctly.

View 8 Replies View Related

Queries :: How To Sum Field Based On Every Year

Jul 2, 2015

I tried writing a SQL query to produce the list of details in year wise DESCENDING order for the input - Agent ID.

In addition to that I need to get the sum of amount fields year wise in the report. How to achieve it???.

Find the attached report for better clarification.

First three column in the attachment is the outcome of the below listed query. Whereas the fourth column is the expected result which needs to be included..

Code:
SELECT CessioneCredito.Data_Movimento, CessioneCredito.Anno, CessioneCredito.Importo FROM CessioneCredito
WHERE (((CessioneCredito.ID_Agente)=[Reports]![R_StoricoCessCredAg]![ID_Agente]))
ORDER BY CessioneCredito.Data_Movimento DESC;

How to alter the code in order to provide the SUM of Importo field every year.???

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved