473,387 Members | 3,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Calculate with selected year only

28
Hi,

i have a from as below. i need to do a calculation for the total no. for day taken for the year selected on start date.



Thank you..


MS Access 2003
Sep 26 '07 #1
3 1213
puppydogbuddy
1,923 Expert 1GB
Try placing the following as the control source of your textbox for the Total, replacing the object names I used with the actual object name in your application. I used [Start Date] for the Actual Start dates, and SelectedStartDate is the date selected from your combobox..

= Sum(IIf(Year([Start Date]) = Year(SelectedStartDate), Days, 0))
Sep 26 '07 #2
anvidc
28
Try placing the following as the control source of your textbox for the Total, replacing the object names I used with the actual object name in your application. I used [Start Date] for the Actual Start dates, and SelectedStartDate is the date selected from your combobox..

= Sum(IIf(Year([Start Date]) = Year(SelectedStartDate), Days, 0))
Thank.. but not really work.
what i do now, i add 1 more field = IIf(Year([Start Date]) = Year(SelectedStartDate), Days, 0)
then i sum field..
is work !!


Thank again..
Sep 26 '07 #3
puppydogbuddy
1,923 Expert 1GB
Good thinking! Thanks for letting us know.
Sep 26 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: David | last post by:
I am learning plsql. I would like to run a stored procedure to calculate my bank account value by predicted 10% annual growth rate. Below is my plsql that is having problems. Your help is highly...
2
by: AccessHunter | last post by:
Hi, I have a table (Admittance) that has birth dates of all cases admitted, fields being (Case Number and Birth Date). I also have a form that asks the user to select a year and click the 'Find'...
11
by: David | last post by:
I am learning plsql. I would like to run a stored procedure to calculate my bank account value by predicted 10% annual growth rate. Below is my plsql that is having problems. Your help is highly...
15
by: student4lifer | last post by:
Hello, I have 2 time fields dynamically generated in format "m/d/y H:m". Could someone show me a good function to calculate the time interval difference in minutes? I played with strtotime() but...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.