Thanks Fred! You win! :)
Fred Taylor wrote:
Get the result of your MOD(value,2.50) and subtract it from your value.
Fred
On Mon, Sep 22, 2014 at 12:41 PM, Mike Copeland <[email protected]> wrote:
I think I'm having an old-timer's spell...
I have a spinner that I need to force into the following values...
0 minimum
2.50
5.00
7.50
etc.
60.00 maximum
So, I set
.KeyboardLowValue and .SpinnnerLowValue = 0
.increment = 2.50
.KeyboardHighValue and .SpinnerHighValue = 60.00
.InputMask = '99.99'
and it works great...IF you use the spinner buttons.
But if you key in a value like "6.00" then the spinner, dutifully and
accurately, goes through
3.50
6.00
8.50
etc.
Now, if you use the spinner buttons to increment all the way down to 0
then it, effectively, does a reset and the incremental values work fine.
0.
2.50
5.00
7.50
etc.
So, I'm going to add a "VALID" check, like
if mod(this.value,2.50)<>0
* do something here
endif
Which brings me to my Question...
What can I insert in the "* do something here" to bump the value up (or
down) to the next acceptable increment?
So, if the user keys in 6.00, I want it to auto-update to either 5.00 or
7.50...not picky which.
What am I missing?
(I've already Googled this for me and read several posts without
success...therefore I awaken the gods of VFP!)
Thanks!
Mike Copeland
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.