UtterAccess.com
We have detected that you are using an unsupported web browser. We recommend you to upgrade your web browser to get the most from UtterAccess forums.
Why should and how can I upgrade?
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,810
From: Birmingham, Alabama USA



Mod is an Operator ...
It would help us if we knew how you were using the Operator ...
ost the expression you are using ...
RDH
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
perator as in takes the place of the division (/) operator!
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,810
From: Birmingham, Alabama USA



Again ... Mod is an "Operator" not a Function.
Your usage of this Operator is not correct.
DH
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 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: 1st September 2014 - 11:14 PM