Require input to be within a given interval

King Kreglo

Registered User.
Local time
Today, 12:58
Joined
Aug 31, 2013
Messages
32
Hi there!

I am trying to make a quantity column in my table only allow input with intervals of 1,000!
Any suggestions?

-Nick
 
can you give an example of what you mean e.g:

1 is not allowed
1000 is allowed
1500 is not allowed
2000 is allowed
 
Hi CG_London!

So one column 1-999 would not be allowed, 1000 is allowed
1001-1999 is not allowed, 2000 is allowed.
2001-2999 is not allowed, 3000 is allowed.

I have another column that has to be entered in blocks of 20,
1-19: not allowed; 20: allowed
21-39: not allowed; 40: allowed

Any thoughts?
 
OK - you say this is for input so I presume you want this as a validation rule?

If so then try the following in your validation rule for the control

[mycontrolname] mod 20=0

and in your validation text put

Value must be a multiple of 20

Obviously change the 20 for 1000 for the other option.

Also if you do not want to allow 0 or negative figures you would need

[mycontrolname] mod 20=0 and [mycontrolname] >19
 

Users who are viewing this thread

Back
Top Bottom