How to tell a number is divisible by 3

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I need to tell if a number is divisible by 3. I'm thinking I can divide the
number by 3 and then see if it is a float or whole number, but looking
through the math functions I don't see function that will do that. Mod isn't
available in Access.

For example:

6/3 = 2
5/3 = 1.66666

Thoughts, ideas?
Thanks,
James
 
The Mod operator yields the remainder after division.

Example:

X = 6
If X Mod 3 = 0 Then
MsgBox "X is divisible by 3"
End If
 
Hi Allen,

Soon after I posted I discovered that. I knew of Mod in other languages, but
couldn't find it in the Access help files.

Thanks for your help!
James
 
Back
Top