access expression

  • Thread starter Thread starter justtrying
  • Start date Start date
J

justtrying

Hi all,
I'm trying to create a formula to total for pounds and ounces. My
brothers and I go fishing and I have been chosen to create several
reports from an access data base to total numbers of fish and the total
pounds and ounces for each fisherman and average pounds and ounces.
Any help would be appreciated. Some fields are: fisherman, pounds,
ounces, date, place, etc.

justtrying
 
First, I would store all weights in ounces. Then it is a simple matter to use a
formula to convert that to pounds and oz.

TotalOunces\16 & " pounds " & TotalOunces Mod 16 & " ounces"


If you have pounds and ounces then you need to multiply the pounds by 16 and add
in the ounces. To get the total weight

Sum((Pounds * 16) + Ounces)\16 & " pounds " & Sum((Pounds * 16) + Ounces) Mod 16
& " ounces "


Avg((Pounds * 16) + Ounces) will give you the average number of ounces.
 
It's a good thing you're not also tracking elapsed time in days,
hours, minutes and seconds :-)

I don't recall having ever done what you want but the best strategy
will probably be to store pounds in one field followed by another
field with ounces. Before you do any math, convert the pounds into
ounces and then add the ounces. Do your math and convert back to
pounds and remaining ounces as the last step.

HT
 
I've already done what you have suggested and the pounds portion of the
formula works great; but, the ounces portion gets all messed up with
decimal numbers.

Thanks for your suggestion.
 
Thanks John,
You've got me on the right track. The total pounds/ounces works
beautifully. I will try to get the average correct. Wish me luck!
justtrying
 
Back
Top