update current pay based on entered data

kellan4459

Registered User.
Local time
Today, 16:18
Joined
Nov 26, 2001
Messages
31
I need to be able to update the current pay field based on pay increase/decrease amount that is entered after evaluations. It must be based on the person's Social Security Number to validate the correct employee and then current pay = current pay + Pay Change. It will do this each time a new evaluation is entered. How can I do this?
 
I do not know how much detail you need so lets start by saying that an Update query will do what you want. Search Help for Update queries for details on how they work.
 
Jack,
I thought about thaat but the problem I think I will have with that is:
They may have multiple times that this is entered per person and many entries per day. Will the query catch all that were added that day? I would like for the command_click to process this at the same time it adds the data to the appropriate field. How hard is that? Will it take a lot of code?
 
The Update query should run after they finish each change to a record. You can do this with a button on the form that the user clicks, but I would suggest that you trigger the code that runs the Update query in the After Update event of some field on the form. Maybe in the Date field or some field that the user will use and this field is after the fields that you need for your calculations have been filled in.

The code should be as simple as:

DoCmd.RunQuery "UpdateQueryName"

so the code is easy and should not present you with any problem.

I hope the above method of triggering the code made sense...

[This message has been edited by Jack Cowley (edited 11-27-2001).]
 
I have developed an update query that is set to update all pay evaluations to give a current pay. It needs to go through and calculate Original pay + all pay changes(multiple)
Basically you will have 1 original pay and multiple pay changes. I need it to loop through and update current pay base on all of the employee's pay changes.
 
How are the pay changes stored some date $3 next date $5 etc, would the current pay be say $200 plus all the changes? Not sure that it's a good idea to actually store the result of this type of calculation but give us some more info.
 
I set it up to where I ran a query to set Current Pay = Original Pay, which clears out any earlier data calculations. I then run a second query that sets Current Pay = Current Pay + Pay Change. When it cycles through it then updates accordingly. It works for what I need it to do. Thanks for the help!
 
Now I'm confused, if it works why post a link and ask for help?
 
I figured it out after I posted and when I came back to post I found the answer you had already posted. I was letting you know what I did to fix it.
 
smile.gif
 

Users who are viewing this thread

Back
Top Bottom