Connecting Tech Pros Worldwide Forums | Help | Site Map

module to modify textbox on a report

Newbie
 
Join Date: Mar 2007
Posts: 14
#1: Mar 24 '07
I know the theory behind what i want to do, but need some help programming this into my report.

I have a field that displays a running sum (over group), but what i want is either this same field or a 2nd field to display that same information but i want it to run through a module that does something like this (using textbox1 as the one with the running sum):

x= textbox1 / 350

-now just get the numbers after the decimal point and muliply by 350

and put this in textbox 2




Basically the effect of this will display the value upto 350 in a loop. so when it hits 350 the next number is then 1.

So 351 in textbox 1 will return 1 or 702 will display 2

nico5038's Avatar
Moderator
 
Join Date: Nov 2006
Location: The Netherlands
Posts: 2,232
#2: Mar 24 '07

re: module to modify textbox on a report


Quote:

Originally Posted by capdownlondon

I know the theory behind what i want to do, but need some help programming this into my report.

I have a field that displays a running sum (over group), but what i want is either this same field or a 2nd field to display that same information but i want it to run through a module that does something like this (using textbox1 as the one with the running sum):

x= textbox1 / 350

-now just get the numbers after the decimal point and muliply by 350

and put this in textbox 2

Basically the effect of this will display the value upto 350 in a loop. so when it hits 350 the next number is then 1.

So 351 in textbox 1 will return 1 or 702 will display 2

Nice problem, could use the MOD command like:

=IIF((textbox1 mod 350)=0,350,(textbox1 mod 350) mod 350)

just:
=textbox1 mod 350

would return 0 for 350 :-(

Nic;o)
NeoPa's Avatar
Administrator
 
Join Date: Oct 2006
Location: London - UK
Posts: 15,731
#3: Mar 28 '07

re: module to modify textbox on a report


Along similar lines :
Expand|Select|Wrap|Line Numbers
  1. =((TextBox1-1) Mod 350)+1
Reply