Can anyone help please am stuck
ACCESS 2007
I have two tables one of them (the rates table) is a Synced list from SharePoint the owner of the list created in an awkward way for me but simple for them. What I need to be able to do is query the Timesheet table (data is imported to this from excel 2003 worksheets) and for each entry work out the appropriate value (value = rate*hours) if the Company cannot be found then the Default rate for that employee is used.
How can I query the rate table for a specific company and a Specific Empoyee giving me one rate value.
Timesheet data
ID Date Hours Company Employee 1 26/01/2009 0.3 CompanyA Employee1 2 27/01/2009 0.5 CompanyB Employee2 3 28/01/2009 1 CompanyC Employee3 4 29/01/2009 1.3 CompanyA Employee4 5 30/01/2009 1.2 CompanyZ Employee2 6 31/01/2009 1.6 CompanyB Employee3 7 01/02/2009 5 CompanyA Employee4 8 02/02/2009 3 CompanyB Employee2 9 03/02/2009 2 CompanyA Employee3
Rates Table
ID Company Employee1
Employee2 Employee3 Employee4
1 Default 75 60 50 44
2 CompanyB 60 50 44 22
3 CompanyC 44 60 50 44
4 CompanyD 44 44 60 50
5 CompanyE 44 22 44 22
6 CompanyF 60 50 44 22
7 CompanyG 44 60 50 44
Many thanks
Marcus

I have two tables one of them (the rates table) is a Synced list from SharePoint the owner of the list created in an awkward way for me but simple for them. What I need to be able to do is query the Timesheet table (data is imported to this from excel 2003 worksheets) and for each entry work out the appropriate value (value = rate*hours) if the Company cannot be found then the Default rate for that employee is used.
How can I query the rate table for a specific company and a Specific Empoyee giving me one rate value.
Timesheet data
ID Date Hours Company Employee 1 26/01/2009 0.3 CompanyA Employee1 2 27/01/2009 0.5 CompanyB Employee2 3 28/01/2009 1 CompanyC Employee3 4 29/01/2009 1.3 CompanyA Employee4 5 30/01/2009 1.2 CompanyZ Employee2 6 31/01/2009 1.6 CompanyB Employee3 7 01/02/2009 5 CompanyA Employee4 8 02/02/2009 3 CompanyB Employee2 9 03/02/2009 2 CompanyA Employee3
Rates Table
ID Company Employee1
Employee2 Employee3 Employee4
1 Default 75 60 50 44
2 CompanyB 60 50 44 22
3 CompanyC 44 60 50 44
4 CompanyD 44 44 60 50
5 CompanyE 44 22 44 22
6 CompanyF 60 50 44 22
7 CompanyG 44 60 50 44
Many thanks
Marcus