Data Validation - Multiples of

StuInBerks

Mr Wigley
Local time
Today, 07:12
Joined
Jul 22, 2002
Messages
8
Within Data validation I am trying to validate data so that only multiples of a number can only be entered into a table (5,10,15,20 etc)

I realise I can use the Or operator to create this as 5 or 10 or 15 etc, however this is time consuming for should the DB involve large numbers.

There MUST be a function somewhere that can allow this?? I have tried the new Excel function MROUND which is not regonised by Access.

The only other alternative I can think of is to create a list or combo box to allow this.

Can anyone help?? please??

Thanks
 
if the number must be a multiple of 5, then it must be divisible by 5 & not return decimals, correct?

so something like:

InStr(([number]/5),".")=False

could be used to validate that the number entered is divisible by 5 at the table level... I tried this on Access 2000 & it works very well.


good luck, I hope that does it for you...
 
Perfecto!!

Thanks Jatfill, much appreciated.
 
There's even a standard Operator for this, it's called MOD...

Number MOD 5 has to equal 0 (zero)

RV
 

Users who are viewing this thread

Back
Top Bottom