UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> MOD function    
 
   
PA232
post Nov 7 2007, 02:43 PM
Post #1

UtterAccess Addict
Posts: 109
From: York, PA



I'm trying to use the MOD function in a query and no matter what I do, I get an error telling me that I'm using invalid syntax. When I look up the function in help, it doesn't appear. It was available in Access 97. Is it no longer available?
Go to the top of the page
 
+
R. Hicks
post Nov 7 2007, 02:56 PM
Post #2

UA Forum Administrator
Posts: 39,672
From: Birmingham, Alabama USA



Mod is an Operator ...
It would help us if we knew how you were using the Operator ...

Post the expression you are using ...

RDH


--------------------
Ricky Hicks
Microsoft MVP
Birmingham, Alabama USA
Go to the top of the page
 
+
njonsie
post Nov 7 2007, 03:04 PM
Post #3

UtterAccess Guru
Posts: 823
From: Midwest



12 Mod 5 = 2

Operator as in takes the place of the division (/) operator!


--------------------
Go Colts!!!
Go to the top of the page
 
+
PA232
post Nov 7 2007, 03:26 PM
Post #4

UtterAccess Addict
Posts: 109
From: York, PA



I'm trying to calcualate even spacing of holes over a distance and I also need the qty of spaces. I've got locations for starting hole, X, and ending hole, Y, and the minimum spacing, Z. My problem is that I was trying to use Mod as a function like this: # of Spaces = IIF(Mod((Y-X)/Z,1)>0,(Y-X)/Z,Int((Y-X)/Z)+1). I may not have the syntax for Mod correct, because I can't find the syntax anywhere. I have a Mastering Access 97 book that only shows that MOD exists, with no examples of how to use it. Thanks for you help!
Go to the top of the page
 
+
R. Hicks
post Nov 7 2007, 03:41 PM
Post #5

UA Forum Administrator
Posts: 39,672
From: Birmingham, Alabama USA



Again ... Mod is an "Operator" not a Function.
Your usage of this Operator is not correct.

RDH


--------------------
Ricky Hicks
Microsoft MVP
Birmingham, Alabama USA
Go to the top of the page
 
+
njonsie
post Nov 7 2007, 06:06 PM
Post #6

UtterAccess Guru
Posts: 823
From: Midwest



What are these holes? Maybe there's a better way to get what you want.


--------------------
Go Colts!!!
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Search  ·  Go to Top  ·  Lo-Fi Version Time is now: 24th July 2014 - 10:38 PM