Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mod function 2

Status
Not open for further replies.

welshone

Programmer
Jul 30, 2001
414
GB
Hello,
I have a crystal report that uses a function called mod.

the function is used on a field called ID to convert the number.
eg,
number starts like 13423453
use mod function like : [ID] MOD 12345
then the number shown is : 5467 (something like that)

does anybody know if a similar function is available in access 2000 ?

thanks
 
Mod is one of the built in functions in the QBE grid expression builder - it returns the modulus of one number divided by another (e.g. if the answer is 3.4, the mod function returns 3) Not sure if that is the function you are after though - looking at your example....
 
stickers, thanks for this,
it sounds like what I want.
how would I use it ?

say I want to divide the numbers in field ID with the number 1234 ?


thanks buddie
 
What I meant (of course...) was that it returns the remainder - after one number is divided by another. But I guess you know that.
But in the Expression builder you just use it in exactly the same way as your crystal report writer!
ID Mod 1234

I've just had another look at the expression builder to refresh my memory, and it doesn't give you mod as an option - so you have to physically type it in, rather than selecting it - but it works in the query I use it in, so I presume it will work for you too!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top