Hi all,
I have a table as follows:
InvoiceID (PK) - Autonumber
MemberNo - text
AgencyName - text
Hours1 - number
Rate1 - currency
Hours2 - number
Rate2 - currency
TotalHours - number
GrossPay - currency
The InvoiceID is the only unique field. This is because the Members may be input a number of times - they can work for different agencies in any one week and their amounts for each agency will differ.
Most members will only work for one agency and thus have just one entry - easy. It's the members that work for more than one agency I'm having the problem with.
How do I combine 2 or more rows (i.e. the same member number but with different hours and rates) in to just one row that is a sum of all their hours1/rate1/totalhours/grosspay etc?!?
I'm really banging my head against the wall now so ANY ideas would be more than appreciated! There is also the possibility that I've got the structure of this table wrong and need to divide it up somehow. Anything!!!
Many many thanks in advance
Grunners
I have a table as follows:
InvoiceID (PK) - Autonumber
MemberNo - text
AgencyName - text
Hours1 - number
Rate1 - currency
Hours2 - number
Rate2 - currency
TotalHours - number
GrossPay - currency
The InvoiceID is the only unique field. This is because the Members may be input a number of times - they can work for different agencies in any one week and their amounts for each agency will differ.
Most members will only work for one agency and thus have just one entry - easy. It's the members that work for more than one agency I'm having the problem with.
How do I combine 2 or more rows (i.e. the same member number but with different hours and rates) in to just one row that is a sum of all their hours1/rate1/totalhours/grosspay etc?!?
I'm really banging my head against the wall now so ANY ideas would be more than appreciated! There is also the possibility that I've got the structure of this table wrong and need to divide it up somehow. Anything!!!
Many many thanks in advance
Grunners