Expression for validation rule in field to force user to enter multiples of #

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dishy78
    New Member
    • Feb 2008
    • 2

    Expression for validation rule in field to force user to enter multiples of #

    Hi

    This is my first time on this site. I have searched help, microsoft, goggle and this forum but cannot find an answer to the following - I'm hoping you can help....

    I'm using Access 2003 and would like to use a validation rule of a field name in a table that will only allow a value to be entered if it's a multiply of 4. Is this possible and if so could you let me know what the expression is?

    Also, as a side thought, does anyone know of any websites that have a listing of different expressions that can be used (for future reference). I have come across multiple websites that show ValidationRules and ValidationText for: <>0; >1000 Or Is Null; Like "A???"; >= #1/1/96# And <#1/1/97#; etc, but have yet to find any that elaborate on this and talk about all the different possibilities.

    Any help you can give is much appreciated

    Cheers

    Trish
  • missinglinq
    Recognized Expert Specialist
    • Nov 2006
    • 3533

    #2
    To allow Zeros:

    [YourFieldName] Mod 4=0

    To not allow Zeros:

    [YourFieldName] Mod 4=0 And > 0


    Welcome to TheScripts!

    Linq ;0)>

    Comment

    • Dishy78
      New Member
      • Feb 2008
      • 2

      #3
      Thanks for that

      Trish :-)

      Comment

      • missinglinq
        Recognized Expert Specialist
        • Nov 2006
        • 3533

        #4
        Glad we could help!

        Linq ;0)>

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32656

          #5
          If you go to where you can enter a Validation Rule (Table design / F6 / Select Validation Rule) then hit F1, you should see a fair explanation.

          Comment

          Working...