How do you perform calculations in Access?
In Microsoft Access, I have a table called Time Sheet, in which case I have a time sheet., Waiter no., Date and hours of operation. I have 10 waiters.
I have another table called Service Fee Distribution. In this table I have a service number, waiter no., Week no. and volume of distribution.
There is a table of accounts in which the distribution of service charges is made up of an account.
I need to calculate the allocation sum in the service charge allocation table, but I don't know how. I would like to do this in Forms. I know how to work out a total for a week.
Can anyone please help?
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 control source.
More information: http://office.microsoft.com/en-us/access/HA012288291033.aspx
source to share