Ukyo Posted February 17, 2009 Posted February 17, 2009 (edited) Dear Professionals, I'd like to restrict certain field so that the user can enter only a certain decimal number. I only want the users to enter: 1.5,2.5,3.5 and so on. Only x.5 But not: 1.1,2.4,3.7 and so on. I've tried the Round() function at Auto Enter Calculated Value, but did not work. I'd really appreciate if someone can help me out. Edited February 17, 2009 by Guest
IdealData Posted February 17, 2009 Posted February 17, 2009 X - Int(X) = 0.5 Use this as a "validate by calculation"
Raybaudi Posted February 17, 2009 Posted February 17, 2009 I've tried the Round() function at Auto Enter Calculated Value, but did not work. something like this may work. Round ( X / 5 ; 1 ) * 5
comment Posted February 17, 2009 Posted February 17, 2009 Assuming integers are allowed as well, try validating the field by calculation = not Mod ( 2 * YourField ; 1 )
Ukyo Posted February 18, 2009 Author Posted February 18, 2009 Thank you all! raybaudi's calculation best fitted my need this time. I should have payed more attention in my Math class...
Recommended Posts
This topic is 5758 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now