Average Cost

D

dbl

Hi I want to bring up a Msgbox which will tell the user the average MEA cost
using the On After Update event in my LabourCost field

The average cost would be 47% of the value entered in the LabourCost field,
how would I go about setting this up?

Thanks Bob
 
D

dbl

Thank you Graham & Arvin for you quick response both methods work fine is it
possible to make it work to 2 decimal places though?

Thanks Again Bob
 
G

Graham R Seach

Bob,

Arvin's suggestion provides for decimal places because dblAvg is a Double
datatype. I imagine what you really mean is that you want to display it with
2 decimal paces. In that case:
MsgBox Format(dblAvg, "0.00")

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
D

dbl

Thanks again Graham that works fine.

Graham R Seach said:
Bob,

Arvin's suggestion provides for decimal places because dblAvg is a Double
datatype. I imagine what you really mean is that you want to display it
with 2 decimal paces. In that case:
MsgBox Format(dblAvg, "0.00")

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
N

NthDegree via AccessMonster.com

Something like this:

Private Sub LabourCost_Change()
MsgBox "Average MEA Cost is = " & 0.47 * LabourCost, vbOKOnly, "Whatever
Title you want for the box"
End Sub
 
H

Hooker DBA [MSFT]

Arvin should not be trusted; he believes that the only appropriate use
of Access is to use MDB / MDE files.

I mean.. that cry baby needs to lose the training wheels
 
T

Todos Menos [MSFT]

Arvin is a baby retarded programmer
don't listen to him or else you'll be stuck in the 1st grade with him,
making $12/hour
 
Top