Mod function

  • Thread starter klp via AccessMonster.com
  • Start date
K

klp via AccessMonster.com

Need a quick fix for the Mod function.

I understand that the Mod function rounds but in my case I need it NOT to
round up. Is there a way around this.

For example when sales puts in and order qty it has to be an even multiple of
a dictated number. If it is then it will continue to the next field otherwise
it will pop up a message box explaining that the qty entered is an invalid
qty - cannot order part rolls and will display what the roll multiple is. In
some cases we can override this. I'm having the problem of my numbers
rounding. What can I do so that the decimal is not ignored?

For example:

I have an order qty of 9.
The Roll Multiple is 4.5. This is an even multiple. But if they put in an
Order Qty of 8 the division is 1.7 w/ a remainder of 4. So in this case a
message would come up and they can have the decision to override or re-enter
a qty. Instead it's looking as if the 4.5 is 4 - giving me an even multiple
of 8. Any suggestions around this?
 
J

JethroUK©

even easier - most order forms 'Qty's are for a multiple/pack or unit, all
you need to do is describe the pack size - using your example:

Desc: Roll

Pack/Carton 9.5 mtrs

Unit price $18.75

Qty 2

gets them 2 packs/cartons of 9.5. @ $18:75 per pack
 
E

e.mel.net

A quick fix would be to multiply all of the numbers involved by 10 or
100 or by however many decimal points you want to clear out.
However, accounting for material by package rather than by length is
a better idea, but probably would require major changes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top