Counting Month Fields For The Current Year?
Nov 4, 2007
Hiya
This is my first post here, but I've two questions so I'll divide it into two threads.
Normally I can google these to help find the answers but a bit of a loss at this one, probably beginners stuff to some of you.
Heres a link to the database below
http://casp.gamecommunity.co.uk/database.gif
Total count is easy: =Count(tblMain!ID1)
What I want to do is count the amount of records for each individual month of the current year so I don't have to change the year date everytime a new year comes round. As soon as the next year comes around they all reset to 0.
The clever way would be to count the records for the current month -1 current month -2 etc and automatically update the month labels but I think that would be getting a bit comlicated.
Thanks in advance for any help. :)
View Replies
ADVERTISEMENT
Mar 5, 2013
I need to put a date field in that is the month and year of the reporting period...
for example
February 2013
and then another date field that is the 10th day of the month following the reporting period.
example: March 10, 2013
I have tried a number of different formats and can't get it right.
View 4 Replies
View Related
May 6, 2013
I am creating a Make Table Query and calculating new fields based on current and prior year-end numbers. If the prior year-end number does not exist (Is Null), I want the use the current rate or calculate the change in rate. I have typed the below in the Field Box:
CHG_IN_PGM_RATE: IIf(([P0_10 Tbl - AM PYE PTD Detail w Rates]![PTD_PYE_PGM_RATE]) Is Null,([MASTER LIST CURRENT]![PTD_PM_PGM_RATE]),(([MASTER LIST CURRENT]![PTD_PM_PGM_RATE])-([P0_10 Tbl - AM PYE PTD Detail w Rates]![PTD_PYE_PGM_RATE])))
However, when running the query, I get the attached error message.
The screenshot will also show how the two tables are joined.
View 2 Replies
View Related
Apr 25, 2014
I'm trying to add a couple of fields to the Contact database in Access 2010.
In the Contacts table, I created a field called "Sobriety Date" that has dates formatted like 12/27/1995
I am trying to add a calculated field called "Years Sober" which should be the current year minus the year in the 'Sobriety Date' field (1995 in the example above).
I have been trying to tweak this:
SUM(DatePart("yyyy",[Date]) - DatePart("yyyy",[Sobriety Date]))
but it's not working. Keeps giving me "The expression that you entered is not valid for web-compatible calculated columns"
View 2 Replies
View Related
Oct 18, 2005
I have a table full of dates of meetings through out the year...
Example
tMeetingDates
16th August 2005
18th September 2005
19th October 2005
23rd November
-----
i also have a report that i print out each month that has the date of the meeting on it... i currently edit the date manually.
I was wondering if there was a way to automate this facility, so that the report looked to the table of dates and looked for the current Months Date that is stored i the table.
i then want this date to be displayed in the Report.
So in this instance if i am running a report for tomorrows meeting being the 19th October it would display that date in the report....regardless of when i run the report...
Obviously if i run the report on the first of November because the month has changed it would then display the date of the November Meeting...
we only ever have one meeting a month!!!!
Please help
Andy
View 11 Replies
View Related
May 11, 2012
I have a query to calculate the monthly depreciation for a machine for specific period of time.
My problem is how to get the number of months for each period assuming i want to start from month September 2009 till may 2012.
Attached the data extracted by the query.
I want to calculate the depreciation to be grouped year by year in report.
[TD][TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
View 3 Replies
View Related
Dec 18, 2005
can i change date format that contain day, month, and year to month and year only..
i try change at fromat at porperties, but it change back into dd/mm/yy at combo box..
this is bcoz i want to filter up my subform that contain parts that purchased by customer by month..
thanks..
View 3 Replies
View Related
Apr 5, 2006
I always have a problem getting this to work without a lot of effort and I know it should be easier than I make it out to be. Problem is say I have a bunch of records I need to summarize by month. Say Dec 05, Jan 06, Feb 06, etc. When I bring down the date col, I do something like:
Format([date],"mmm - yy")
And do a totals query with a second col that returns say a count for each period. This works fine except that when I sort I get Dec 05, Feb 06, Jan 06, etc.
How can I do this with out having to create a third col to do the sorting stuff? Should I somehow wait until the data gets to the report to do the date format stuff???
:confused: :confused:
View 1 Replies
View Related
May 1, 2006
For the record, I have indeed searched the forum for help with this, but no luck so far, so here goes. (C++ programmer, little background in access).
I have a table that stores a person's name, gross amount spent, gst spent, pst spent, and total amount spent.
I need to be able to create a query or something that asks me to enter a year, and it will sum up the amounts, gst, and pst over the course of that year, and print it neatly on screen.
Also, I need to be able to create a similar query that asks for a year and a month (does access possess Java's ability to easily create a pop-up calendar applet-like instance that provides a GUI for selecting months/years, or does the data need to be entered through a command prompt?) which will create a month-end report in the same manner, but only spans a 1 month period?
Any information that could be provided to me, even a means of getting started on this problem, would be great. Thank you and cheers everyone!
View 2 Replies
View Related
Aug 28, 2006
if i have a table like this:
4/3/2006
4/3/2007
4/12/2006
4/12/2008
5/2/2003
5/5/2003
i would like to extract only the distinct month and year date, so my query should return
4/12/2006
4/3/2007
4/12/2008
5/5/2003
can anyone plz help me with the sql query? thanks
View 2 Replies
View Related
Jul 22, 2007
I have another...
How do I group the dates on my query to show only a certain month and year?
View 2 Replies
View Related
Aug 14, 2007
Hey all, I have a form that has two textboxes, one box is for month and the other is for the year. After I enter the month and year I want, I click on a command button that previews a report. Well, the report is not giving me the information for that particular month and year, actually it gives me nothing.
The report gets its information from a query. In that queries criteria field is the below expression that I have.
Like [forms]![frmPEL]![cboMonth] & "/*/" & Right([forms]![frmPEL]![txtYear],2)
Can anyone see anything wrong with this? I should be able to enter the month and year and click on the report button I want and preview that report, but no joy.
Your help is greatly appreciated.
RR
View 5 Replies
View Related
Jul 30, 2012
I have tried to do this using DateAdd but I cant get it to add both the month and year.
I have a date field [HireDate] and I need to add one year then get then get the first day of the next month.
For example: HireDate = 1/15/2012 - I need access to return 2/1/2013.
how to build that expression?
View 4 Replies
View Related
Jan 7, 2005
I have this BIG Problem:
I have a form where i use 9 text fields named “Pallet” bound to 9 different tables (each table belongs to each terminal user, I create these tables due I have to perform differents actions and reports by person) i get the max value of each table by model and by user using the DMax function, the key point is to get the Max Value of this 9 fields just like this:
Field (Pallet)#1:108 Field (Pallet)#5:136 Field (Pallet)#9:159
Field (Pallet)#2:109 Field (Pallet)#6:138
Field (Pallet)#3:115 Field (Pallet)#7:132
Field (Pallet)#4:125 Field (Pallet)#8:138
Max Pallet: 159 I got this value creating the follow function...
Public Function fMax(ParamArray Variables())
Dim i As Integer
For i = 1 To UBound(Variables)
If Variables(i) > Nz(fMax) Then
fMax = Variables(i)
End If
Next i
End Function
Based on this i open a controlled field in my form and wrote this function:
= fmax ([Pallet#1]; [Pallet#2]; [Pallet#3]; ...[Pallet#9] )
The BIG QUESTION is how can i reset to zero the criteria in my Dmax function to get the max value of each table??? Due each month the counting needs to be reset to zero because the issue is to get every month the production quantity of cell phones pallets produced, and if I let this function alone, it will give me the max pallet number regardless the month the key is to get the max value according the month…
I try this function but doesn't work:
=DMáx("[Escaneo_Gabriela]![Tarima]","[ Escaneo_Gabriela]"," [Escaneo_Gabriela]![Modelo] = 'G1500S' And Month([Escaneo_Gabriela]![Fecha])=Month(Date()) And Year([Escaneo_Gabriela]![Fecha])=Year(Date())")
I was thinking in open a field in each table named "Month" and create a function or module to give me the value only of the current month based on this field, but i'm not quite sure about the sintax, PLEASE HELP ME>>>!!!!!!!
View 1 Replies
View Related
Feb 19, 2007
Hi all.
I have chart in ADP project/MS SQL Express and I want to see in chart table (date Field, data field) grouped by year and month: 2005.01, 2005.02, 2005.03....
I try this str = DATENAME(yyyy,date)+ DATENAME(m,date), SUM(data) FROM table GROUP BY DATENAME(yyyy,date)+ DATENAME(m,date) ORDER BY DATENAME(yyyy,date)+ DATENAME(m,date)
problem is with sorting: 2005April, 2005februar,2005,Januar - its sorting not by date, but alpabhetic.
Please, help with other grouping way!
View 2 Replies
View Related
Apr 19, 2007
Hey guys.... stucked in one thing..... I need to extract Month and Year together from a date in a Query. for example if date is 4/19/2007 i want to put this as April 2007.
Any idea ...?
thanks
View 5 Replies
View Related
Aug 16, 2005
hi friends,
I want to get year and month field of datetime field so that i can get data by comparing them with other table fields.
ex: date field column contains 1/28/2005 as data
how to get year(1/28/2005)
how to get month(1/28/2005)
expecting your help
Thanks,
Spec
View 3 Replies
View Related
Aug 20, 2007
I have a table a
year month day
2005 1 1
2005 3 1
2006 5 1
I want to generate the associateed
1/1/2005
3/1/2005
5/1/2005
which funciton I can use to do that?
Jeff
View 3 Replies
View Related
Sep 5, 2005
I have a reports form where the user can enter enter a from date and to date for the report criteria. I have an unbound field on the report which i want to display the month and maybe the year in which this date criteria is in. This will be needed to display on the actual form. Say if the date range is between 01/01/05 and 31/01/05. I need the field to say January 05.
Hope this makes sense and can be done
View 6 Replies
View Related
Mar 13, 2006
I have a field that is:
Current length of continuous allocation of Care Co-ordinator. ( years and months )
Ideally I would like to have two drop down menus - one with years and one with months.
Would I have to have two fields in my table - one for years and one for months or can I have one?
Whats the best way?
Thanks.
View 3 Replies
View Related
Oct 20, 2006
On my form day/month/year has switched to year/month/day. On a table there are three separate date cells. Order Date, Shipping Date, and Report Date. They are each formated to medium style. At first I also used an input mask then I found that Access would convert to the format I choose. I had missed one of the input masks during the removal and when I removed the last input mask Access now converts to yy/mmm/dd. What just happened and how do I reverse this? It is more convienant for some of the users to not have the input mask but the order has to be uniform.
View 3 Replies
View Related
May 4, 2015
I'd like the user to be able to search a subform only by month and year. We have lots of reports with different days, but none of them are pertinent to searching.
I don't mind if it looks a little bit messy (such as using the calendar drop down and it discounting the day) but I'd like to have it all in one box, preferably where the user can just select ex. 05/2013 and it would filter the subform, showing only reports from that month.
View 6 Replies
View Related
Feb 6, 2014
I have a query that I need to total by each month of the year. Field names and types are as follows
ID (PK)
Month (Date/Time)
PoliceResponse (1 or 0)
TerminalCheckTrue (1 or 0)
RampCheckTrue (1 or 0)
AOACheckTrue (1 or 0)
TotalTerminalRampAOA (TerminalCheckTrue + RampCheckTrue + AOACheckTrue)
TotalChecks (PoliceResponse+TerminalCheckTrue + RampCheckTrue + AOACheckTrue)
Now, I need to just get the total of each of these fields per month for the entire year. So it would look like
Jan, MonthlyPoliceResponse, MonthlyTerminalChecks, etc...
Feb, MonthlyPoliceResponse, MonthlyTerminalChecks, etc...
Mar, MonthlyPoliceResponse, MonthlyTerminalChecks, etc...
Below is a sample from the query. I guess Im just not sure where to start since there are multiple months the same value, but i need them to total up..
Code:
SELECT DISTINCTROW tblBlotter.ID, Format$([tblBlotter].[EntryDate],'mmmm yyyy') AS [Month], Sum(IIf([CKPoliceResponse],1,0)) AS PoliceResponseTrue, Sum(IIf([CKTerminalCheck],1,0)) AS TerminalCheckTrue, Sum(IIf([CKRampCheck],1,0)) AS RampCheckTrue, Sum(IIf([CKAOACheck],1,0)) AS AOACheckTrue, ([TerminalCheckTrue]+[RampCheckTrue]+[AOACheckTrue]) AS TotalTerminalRampAOA, ([PoliceResponseTrue]+[TerminalCheckTrue]+[RampCheckTrue]+[AOACheckTrue]) AS TotalChecks
FROM tblBlotter
GROUP BY tblBlotter.ID, Format$([tblBlotter].[EntryDate],'mmmm yyyy'), Year([tblBlotter].[EntryDate])*12+DatePart('m',[tblBlotter].[EntryDate])-1, Year([tblBlotter].[EntryTime])*12+DatePart('m',[tblBlotter].[EntryTime])-1;
View 14 Replies
View Related
May 9, 2013
I try this code
Code:
SELECT Format(ReportTbl.lot_date,"mm-yyyy") AS Lot,
Round(Avg(ReportTbl.avg_dat),2) AS DataAvg,
Round(Avg(ReportTbl.avg_len),2) AS LenAvg,
Round(Avg(ReportTbl.avg_in),2) AS InAvg,
Round(Avg(ReportTbl.avg_out),2) AS OutAvg,
Round(Avg(ReportTbl.avg_thi),2) AS ThiAvg,
Round(Avg(ReportTbl.avg_moi),2) AS MoiAvg
FROM ReportTbl
GROUP BY Format(ReportTbl.lot_date,"mm-yyyy")
ORDER BY ReportTbl.lot_date;
But it not working and have warning box with "you tried to execute a query that does not include the specified expression 'ReportTbl.lot_date' as part of an aggregate function"
and when I try
GROUP BY Month(ReportTbl.lot_date),Year(ReportTbl.lot_date) or
GROUP BY datepart("m",ReportTbl.lot_date),datepart("yyyy",R eportTbl.lot_date)
or other code that I can search in google
I get the warning message that resemble with above message
and when I try to GROUP BY ReportTbl.lot_date it work but the result does not meet the requirements.
View 3 Replies
View Related
Nov 6, 2014
I am working on an access database for my team. We keep and maintain a trail log for different departments.
The person will send a trail sheet to us we will input the info and attach what we call Production Instructions Number in this format (YEAR-Month-001), the next trail will get (YEAR-Month-002), the last 3 digits will start over when the month changes, I would like the PI number to populate automatically when the info is inserted.
View 11 Replies
View Related
Jan 11, 2007
I have a table, part of which includes a [start date] and [end date]. I need to be able to plot a graph that will show, for each month, how many projects were still open. they will at the start of the month have a [start date] but no [end date]. I have created another table that holds the date for the first of every month in the range that I am intrested in. I suspect I need to use a subquery in here somewehre but cant get my brain around it :(
Many thanks
Peter
View 2 Replies
View Related