possible mask? display running sum on report

capdownlondon

Registered User.
Local time
Today, 18:48
Joined
Mar 18, 2007
Messages
52
well basically i have a field that displays a running sum, and what i want it to display is the running sum upto 350 and then start from 0.

What i was thinking, is it possible to code the text box that displays the running sum to store the value of the running sum, but the code says
only show 0-350. so if the value was 351 the textbox would only show 1.
or for example if the value was 700 it would show 350. etc
 
If I understand you correctly I think you want the MOD operator

10 MOD 5 returns 0 (the remainder of the division)
11 MOD 5 returns 1 etc

You need to do a slight shift though because obviously you don't want zero returned.

So (([myInput]-1) Mod 350)+1 should give you what you need I think i.e.

[myInput]_______(([myInput]-1) Mod 350)+1
1______________________1
2______________________2
349____________________349
350____________________350
351____________________1
700____________________350
701____________________1

etc

hth
Stopher
 
yes this looks like what i need- thankyou.

but where would i put this code on the form?

how would i implement it?
 
I hear i am to put it in the control source, but i am getting an error "#Name?"
 
Ooops!

Ok that bit was my bad. I had a bit f code i was trying to do earlier, to fix the problem, and i forgot about it. Just deleted it and it all works fine.
Thankyou for your help:D
 

Users who are viewing this thread

Back
Top Bottom