You're getting the error because "SUM" is not a Visual Basic function. If you're trying to get a summation of all the records of a particular field, you will need to use the "DSum" function. Also, you're going to have a problem if any of the "CloseTime", "OpenTime", or "DaysClsd" are defined as Date/Time fields. You will need to use the DateDiff function to subtract dates. If these are numeric fields, you should be ok. Try the following function; I added the "nz" function to deal with any possible null fields; if any of the fields are null, you will get an error.