I have inherited a time sheet database which stores the hours that a person has worked against a project with a link to an employee table for his name which is linked to a positions table which gives the rate charged.
And there is a totals value in the database which is supposed to be the hours multiplied by the rate.
At the present the total is calculated by some poor girl sitting there with 900 records in front of her clicking on each one which triggers a script that calculates the two. Then she clicks on a tickbox to show she has processed it.
Access being Access, a calculation can take 30 seconds!!
Then she exports it all into Excel and forgets about it!
I think I can make that a little easier to do!
But I am stuck. My initial thought was just to do a simple update query such as: (After writing all the unprocessed to a csv she can open in excel)
[navy]"Update TimeSheetData set Total = Hours * rate, processed = 1 where processed = 0"[/navy]
But how do I do this when the rate is stored in another table that is referenced thru a third table?
[navy]"update sheets set TimeSheetData.total = TimeSheetData.hours * positions.rate inner join staff ON TimeSheetData.staff = staff.ID inner join positions ON staff.rate = positions.ID where Processed = 0"[/navy]
Didn't Parse.
Anybody know the syntax of the top of their heads? A young lady by the name of Angela will be eternally grateful if she doesn't have to spend hours clicking an Access database for no reason.
And there is a totals value in the database which is supposed to be the hours multiplied by the rate.
At the present the total is calculated by some poor girl sitting there with 900 records in front of her clicking on each one which triggers a script that calculates the two. Then she clicks on a tickbox to show she has processed it.
Access being Access, a calculation can take 30 seconds!!
Then she exports it all into Excel and forgets about it!
I think I can make that a little easier to do!
But I am stuck. My initial thought was just to do a simple update query such as: (After writing all the unprocessed to a csv she can open in excel)
[navy]"Update TimeSheetData set Total = Hours * rate, processed = 1 where processed = 0"[/navy]
But how do I do this when the rate is stored in another table that is referenced thru a third table?
[navy]"update sheets set TimeSheetData.total = TimeSheetData.hours * positions.rate inner join staff ON TimeSheetData.staff = staff.ID inner join positions ON staff.rate = positions.ID where Processed = 0"[/navy]
Didn't Parse.
Anybody know the syntax of the top of their heads? A young lady by the name of Angela will be eternally grateful if she doesn't have to spend hours clicking an Access database for no reason.