PC Review


Reply
Thread Tools Rate Thread

*Complex query/calculations

 
 
=?Utf-8?B?Sk1vcnJlbGw=?=
Guest
Posts: n/a
 
      27th Feb 2004
I have a form which feeds TblEmpLeave with Employee Leave Time (time taken off for Administrative, Annual, Sick, Compensation leave). I have LeaveDate, LeaveType, LeaveHours fields on this form. Any employee can have multiple entries in the table for multiple dates (John Doe can take 3 days annual leave, then take 3 days sick leave in any given month)

I have a BeginningBalance of hours they've accumulated throughout the year, and an accumulation factor for Annual and Sick leave

I want to subtract from the BeginningBalance of LeaveType(s) for each record in TblEmpLeave. As such, I can calculate the first occurance of leave, but if the employee has another record in TblEmpLeave, I'm having problems subtracting from the new value of BeginningBalance

Sick Leave example
for first occurance of SickLeave taken by an Employee that is appended to TblEmpLeave
[TblEmp].[SickBalance] = [TblEmp].[SickBalance] - [TblEmpLeave].[SickLeaveHoursUsed

for second and subsequent occurances of same employee in TblEmpLeave
[TblEmp].[SickBalance] = [TblEmp].[SickBalance] - [TblEmpLeave].[SickLeaveHoursUsed]

finally, at the end of the month, for each record in TblEmp, after calculating all leave used
[TblEmp].[SickBalance] = [TblEmp].[SickBalance] + [TblEmp].[SickLeaveAccumulationFactor]

I'm sure I know what I want to do (which is a good start), but not sure how to go about it

thanks in advance
jl

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Sk1vcnJlbGw=?=
Guest
Posts: n/a
 
      1st Mar 2004
I was able to handle this programming technique in SAP's ABAP/4, but how is it done in Access/VB

Please advise.
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Table with complex calculations Rick Microsoft Excel Worksheet Functions 3 6th Jan 2008 07:08 AM
RE: Iterations of complex calculations =?Utf-8?B?c2IxOTIwYWxr?= Microsoft Excel Misc 0 25th Feb 2007 06:01 AM
Re: Iterations of complex calculations Mike Middleton Microsoft Excel Misc 0 10th Jan 2007 07:43 PM
complex calculations juliadesi Microsoft Excel Misc 6 17th Mar 2006 01:14 PM
Complex (for me) calculations on database trettr Microsoft Access Queries 3 2nd Sep 2003 04:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:17 PM.