Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quarter-to-Date hours

Status
Not open for further replies.

shwin

Programmer
Jun 10, 2004
15
US
Hi Guys!

I have been reading the postings on the forum but I have not been able to get what I need from them. Maybe one of you guys can help me out.

I have a form with 3 fields: Month, Year, and Hours. I would like to calculate the Total Hours, YTD Hours, and Quarter-to-Date hours for each record. I have the Total Hours and YTD Hours working just fine but the Quarter-to-Date hours is giving me problems. I am not even sure how to begin this. If anyone has any advice it would be great. I am not sure if I should query this first or if I can calculate this through an "IIf" statement or what to do. Thanks for your help!
 
Sorry, I'm not a native english speaker.
What are YTD Hours and Quarter-to-Date hours ?
And can you please post how you calculate the Total Hours and YTD Hours ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
shwin,

Check out the DatePart function. You can do a query to limit the recordset to records where the quarter of the selected record = the current quarter. Use the interval "q" to return the quarter (1 - 4)

Code:
... where DatePart("q",[fieldname])=DatePart("q",Now())

Hope this will give you an idea.

huskerdon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top