I want to get the average as tests are input. There are up to eleven tests total but sometimes less. I want the average after 1 and 2 have been performed as well as after 1, 2 and 3 have been performed and so on.
Also, we do not know anything about your project or application unless you explicitly tell us about it. That means a question such as, "The client button doesn't populate the third insurance claim selector with the code!!!" will go unanswered. We don't know what you're talking about, sorry.
In short, give us half a chance at actually being able to answer your question. Make it as easy as possible, and you're FAR more likely to get a response.
What's the table structure? How are the values being entered? How is the form set up? What controls are involved? What's their names? And any other information necessary to answer your question is generally required
I had wanted to do a screen shot but cannot figure it out so instead I'll try to explain.
We are producing coated grass seed. At every 2000 lb interval of produced seed we run a moisture test (we do this on the raw seed as well as the coated seed).
The database has a table for "Coated Seed Quality Control" and columns in this table are: Raw Moisture 1, Raw Moisture 2, Raw Moisture 3, Coated Moisture 1, Coated Moisture 2, Coated Moisture 3, etc.
Once 2000 lbs is produced let's say at 8:30 am, I want the production supervisor to do a moisture test and enter that data into the db form in the Raw Moisture 1 field. Then at 9 am when the second 2000 lbs is produced I want the production supervisor to do a moisture test and enter that data into the db form in Raw Moisture 2 field. I want the Average Moisture field to average tests 1 and 2 and each additional test as they are input. So once two samples have been taken I want the average of those two samples. Once three samples have been taken I want the average of those three samples and so on.
I tried to use the following expression in the control source for the field titled "average raw moisture": =avg([Raw Moisture 1]+[Raw Moisture 2]+[Raw Moisture 3]+[Raw Moisture 4])
I entered that expression in the Event tab in the After Update field. I get a message that says: Microsoft Access can't find the macro 'Average Moisture = ([Raw Moisture 1]+[Raw Moisture 2])/2.'
The macro (or its macro group) doesn't exist, or the macro is new but hasn't been saved. Note that when you enter the macrogroupname.macroname syntax in an argument, you must specify the name the macro's macro group was last saved under.
It's not a macro. I think Poppa Smurf was suggesting you put that in as code behind the AfterUpdate Event (click the dots in the After Update event field of the properties list, then choose code, paste what he wrote there). I think that should work.