Average Cost

  • Thread starter Thread starter dbl
  • Start date Start date
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
 
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
 
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
 
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
 
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
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

--
Never let it be said that I was totally comitted to sanity. It is the dark
places of my mind that fascinate me.

NthDegree

Message posted via AccessMonster.com
 
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
 
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
 
Back
Top