views:

1035

answers:

2

In Microsoft Access I have a table called Time Sheet and in this I have Time sheet no. , waiter no. , date and hours worked. I have 10 waiters.

I have another table called Service Charge Distribution. In this table I have Service Charge No. , waiter no. , week no. and distribution amount.

There is a Bill table where the Service charge distribution is worked out from the bill.

i need to calculate the distribution amount in the service charge distribution table but I do not know how to do this. I would like to do this in Forms. I do know how to work out the total for a week.

Could anyone help?

+1  A: 

I think the formula would be :

Total Distribution Charge for the week /(number of waiters worked * hrs worked by one worker)

A: 

I think you are looking for DSum:

Answer=DSum("NameOfField","NameOfTable", _
  "SomeDate Between #2008/1/20# And #2008/1/27#")

You can, of course, use a variable:

Answer=DSum("NameOfField","NameOfTable","SomeDate Between #"
  & date()-weekday(date())+1 & "# And #" & date()-weekday(date())+7 & "#")

You can also use DSum in a Control Source.

Further information: http://office.microsoft.com/en-us/access/HA012288291033.aspx

Remou