Anybody an access expert?
Oct. 8th, 2005 10:53 pmBecause I'm far from it.
I am such a geek, however, that I have an Access database that I use to catalog all of my yarn inventory. Seeing as how I'm trying to get into the business of design and consignment, I need to keep better track of my materials cost. So I'm setting up an access report that shows me how much I've got in a given yarn on hand.
I'm trying to set up a formula that would multiply the number of balls x price per ball. However, if I have less than a full ball, I still want to count it as a full ball for these purposes (seeing as how I can't just walk in and buy a half ball of yarn).
I know that what I'd do in Java: math.ceiling(number of balls) * cost per ball. But I can't seem to find a ceiling function in Access, and I've had no luck googling to find it. The Round() function isn't cutting it, because it's rounding down (even for .5, which is odd to me).
Help???
I am such a geek, however, that I have an Access database that I use to catalog all of my yarn inventory. Seeing as how I'm trying to get into the business of design and consignment, I need to keep better track of my materials cost. So I'm setting up an access report that shows me how much I've got in a given yarn on hand.
I'm trying to set up a formula that would multiply the number of balls x price per ball. However, if I have less than a full ball, I still want to count it as a full ball for these purposes (seeing as how I can't just walk in and buy a half ball of yarn).
I know that what I'd do in Java: math.ceiling(number of balls) * cost per ball. But I can't seem to find a ceiling function in Access, and I've had no luck googling to find it. The Round() function isn't cutting it, because it's rounding down (even for .5, which is odd to me).
Help???
no subject
Date: 2005-10-09 03:19 am (UTC)*nods sagely*
*runs shrieking*
no subject
Date: 2005-10-09 03:21 am (UTC)I'd say you need it, yes ;)
no subject
Date: 2005-10-09 04:52 pm (UTC)no subject
Date: 2005-10-11 03:57 am (UTC)no subject
Date: 2005-10-11 04:00 am (UTC)no subject
Date: 2005-10-11 03:13 pm (UTC)I found a function that would convert a decimal to an integer, and as long as it was negative, it would do it in the way I wanted. So I ended up doing this:
Abs(Int(0-numBalls)) * costPerBall
instead of the easier
ceiling(numBalls)*costPerBall.
Sheesh.