Need Help with "Average" function 
Author Message
 Need Help with "Average" function

URGENT! Average function needed!

I am using ACCESS '97 to develop a testing application. This
application  will input 112 values to one record in a database. The
values are to be numbers (0-4) or text (X). My problem is that I need to
average a set of 7 values (from one record) and use that average to plot
to a graph. I have developed the data entry screens and the graphing,
but I can't seem to be able to create a function that can first evaluate
whether the value is a number, discard non-number values and then
average the other values.

I do have fields on a form that I can create a calculated field from.

I know this function can be done because the AVERAGE function in Excel
can easily do this operation.

Please help!

Thanx.



Mon, 20 Mar 2000 03:00:00 GMT  
 Need Help with "Average" function

On the After_Update event property have an event procedure with the
following:

If Not(IsNumeric(Me![CtrlX]) Then
        Me![CtrlX]=0    'Or have Me![Ctrlx]=Me![Cntrlx].OldValue, stay away from NULL
                        'NULL will make the Average NULL as well
Else
            Me![Average Control]=(Me![Ctrl1]    +Me![Ctrl2]+ ...
+Me![Ctrl7])/7
End IF

--
Steve Bliss
PS The "bye" before my email name is to prevent spam.
Remove the "bye" if sending me email.



Quote:
> URGENT! Average function needed!

> I am using ACCESS '97 to develop a testing application. This
> application  will input 112 values to one record in a database. The
> values are to be numbers (0-4) or text (X). My problem is that I need to
> average a set of 7 values (from one record) and use that average to plot
> to a graph. I have developed the data entry screens and the graphing,
> but I can't seem to be able to create a function that can first evaluate
> whether the value is a number, discard non-number values and then
> average the other values.

> I do have fields on a form that I can create a calculated field from.

> I know this function can be done because the AVERAGE function in Excel
> can easily do this operation.

> Please help!

> Thanx.



Tue, 21 Mar 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Function that returns "current function"

2. Help on "function not yet implemented"

3. Newbie needs help with MIN, MAX and AVERAGE functions

4. *"*-.,._,.-*"* I"LL TRADE VISUAL C++ FOR VBASIC *"*-.,_,.-*"*

5. Need help with "Invalid Argument"

6. Need help, if possible: "SQLSetConnectAttr failed"

7. need help about "null"

8. Need help using the "Sendkeys" command

9. Need help using the "Sendkeys" command

10. Help needed with RunAddon, "Database Refresh Shape", auto refresh

11. Need help w/ "play"

12. need help with "enter" key

 

 
Powered by phpBB® Forum Software