MOD Function in MS ACCESS

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • spideynok
    New Member
    • Feb 2012
    • 14

    MOD Function in MS ACCESS

    Hi. I'm a newbie regarding the use of MS Access and i have some problem that i would like to ask for a help or an answer..

    i use this EXCEL formula
    Code:
    =IF(ISBLANK(I5),"",(NETWORKDAYS(F5,I5,HolidayList)-1)*(DayEnd-DayStart)+IF(NETWORKDAYS(I5,I5,HolidayList),MEDIAN(MOD(I5,1),DayEnd,DayStart),DayEnd)-MEDIAN(NETWORKDAYS(F5,F5,HolidayList)*MOD(F5,1),DayEnd,DayStart))
    then i create the same system on MS Access. I created a query so that this function on MS Excel will also calculate/work on my MS Access Database. and i use this code.

    Code:
    IIf(ISBLANK([Date Forwarded to IRM]),"",(Workdays([Date Received by APA],[Date Forwarded to IRM])-1)*EndDate-StartDate)+IIF(Workdays([Date Forwarded to IRM],[Date Forwarded to IRM]), MEDIAN(MOD([Date Forwarded to IRM],1),EndDate,StartDate),EndDate)-MEDIAN(Workdays([Date Received by APA],[Date Received by APA])*MOD([Date Received by APA],1),EndDate,StartDate))
    and theres an error appearing on my screen saying The expression you entered contains invalid intax. You may have entered a comma without a preceding value or identifier.

    Then when i click Okay. the word "MOD" is highlighted.

    may anyone please help me on my problem? I'll appreciate every reply and suggestion. Thank you in advanced :)
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    In Access, it's an operator and not a function.

    Comment

    • spideynok
      New Member
      • Feb 2012
      • 14

      #3
      but am i able to use that operator on that kind of computation?

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        You can use it, you just have to use it like an operator, not a function.

        Comment

        • spideynok
          New Member
          • Feb 2012
          • 14

          #5
          Thanks Rabbit but im a little bit confuse on how can i use it as an operator?

          Comment

          • Rabbit
            Recognized Expert MVP
            • Jan 2007
            • 12517

            #6
            The same way you would add two numbers. + is an operator, - is an operator, mod is an operator.

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32666

              #7
              Code:
              X = Y Mod Z
              This sets X to the remainder value when Y is divided by Z. If you need more explanation then the Help system will give you more than any person could require. See Context-Sensitive Help for how to find anything you need.

              Comment

              Working...