473,326 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

MOD Function in MS ACCESS

spideynok
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
Expand|Select|Wrap|Line Numbers
  1. =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.

Expand|Select|Wrap|Line Numbers
  1. 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 :)
Mar 7 '12 #1

✓ answered by Rabbit

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

6 9063
Rabbit
12,516 Expert Mod 8TB
In Access, it's an operator and not a function.
Mar 7 '12 #2
but am i able to use that operator on that kind of computation?
Mar 8 '12 #3
Rabbit
12,516 Expert Mod 8TB
You can use it, you just have to use it like an operator, not a function.
Mar 8 '12 #4
Thanks Rabbit but im a little bit confuse on how can i use it as an operator?
Mar 8 '12 #5
Rabbit
12,516 Expert Mod 8TB
The same way you would add two numbers. + is an operator, - is an operator, mod is an operator.
Mar 8 '12 #6
NeoPa
32,556 Expert Mod 16PB
Expand|Select|Wrap|Line Numbers
  1. 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.
Mar 8 '12 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Mark Dicken | last post by:
Hi All, I am trying to Pass A Collection To A FUNCTION ??? (Access 2000) I have a Class called BO (for Business Objects) Within BO I have a Function called ShowCollection Public Sub...
0
by: chip0312 | last post by:
Yesterday this code work fine on getting monthly averages SELECT Avg(turn1.Turn) AS Average, Format(,"yyyy-mm") AS FROM turn1 WHERE turn1.type='Renewal' GROUP BY Format(,"yyyy-mm"); ...
0
by: ss | last post by:
i read a few posts about global function access. well i am not interested in global functions. rather, i am seeking for a way to may my call in ASPX pages but not the code behind. for example:...
16
by: bobueland | last post by:
Look at the code below: # mystringfunctions.py def cap(s): print s print "the name of this function is " + "???" cap ("hello")
2
by: pkpatil | last post by:
Hi, Can a private composite object in a class access private or protected members of base class? For e.g. class composite { void memberFunction(); };
8
by: Sullivan WxPyQtKinter | last post by:
I am confused by the following program: def f(): print x x=12345 f() result is: 12345
3
by: dolphin | last post by:
Hello everyone! Can a static member function access non-static member? I think it is illegal.Is it right?
8
by: mguy27 | last post by:
We have about 2 dozen security officers who patrol about 120 buildings. They find defective or unlocked doors and write a "Trouble Report" on the door. This card gets turned in, where I have designed...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.