If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Re: Calculation on Form's Before Update

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.