MOD Worksheet function

  • Thread starter Dimitris Nikolakakis
  • Start date
D

Dimitris Nikolakakis

I have the following tables

STORAGE with ID, Name, Price, PackagingQty

STORAGETX with ID (autonumber), StorageID, Price, Quantity

I have created a form to insert STORAGETX records.

I know that there is a function MOD(number,divisor) and I want to use it to
check that if I divide the STORAGETX.Quantity with STORAGE.PackagingQty the
remainder is 0

Where can I use it ? I tried in the form, in the field Quantity in
Validation rule but I get error "The expression you enter contains invalid
syntax"

Any help is appreciated

Thanks
 
J

John Vinson

I know that there is a function MOD(number,divisor) and I want to use it to
check that if I divide the STORAGETX.Quantity with STORAGE.PackagingQty the
remainder is 0

Annoyingly enough, the Access Help provides help on the Excel Mod()
function - but the Access database engine does this operation in a
different manner! The Help file is to blame for your confusion.

Rather than a Function call use the MOD operator:

SELECT ...
WHERE STORAGETX.Quantity MOD STORAGE.PackagingQty > 0

will select all nonzero remainders.
 

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

Similar Threads

Warning message before update 1
help needed in excel 07 0
Mod(number;divisor) 1
Calculation in Access 1
MOD function 4
MOD function 1
Access Passing the value to a table 1
validation rule restricting currency to $5 and up 2

Top