Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    May 2001
    Location
    MIA (takittodahous), Florida, USA
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    That's Odd (MSAccess2k2/Win2k2Pro)

    Hi,

    I want to confirm whether my calculation in a query is divisible by a given number - but in Access (as opposed to Excel) I can't use IsOdd (Even, whathaveu) nor IsInteger.... Anyone know a good method for determining he divisiblility of a number in Access?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: That's Odd (MSAccess2k2/Win2k2Pro)

    You can use Mod. This returns the remainder of a division. For instance, 17 Mod 7 is 3, because 7 goes 2 times into 17, leaving a remainder of 17 - 14 = 3. To test if a number is divisible by 7, test if the number Mod 7 is 0. To test if a number is even, test whether the number Mod 2 =0, and to test if a number is odd, test whether the number Mod 2 = 1.

  3. #3
    Star Lounger
    Join Date
    May 2001
    Location
    MIA (takittodahous), Florida, USA
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: That's Odd (MSAccess2k2/Win2k2Pro)

    Perfect! Thanks ;-]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •