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

Welcome to UtterAccess! Please ( Login   or   Register )

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



Posts: 109
Joined: 8-January 07
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: 40,273
Joined: 8-February 00
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



Posts: 823
Joined: 7-December 06
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



Posts: 109
Joined: 8-January 07
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: 40,273
Joined: 8-February 00
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



Posts: 823
Joined: 7-December 06
From: Midwest


What are these holes? Maybe there's a better way to get what you want.
Go to the top of the page
 


RSSSearch   Top   Lo-Fi    29th July 2015 - 08:58 PM