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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Module to modify text box on a report

Status
Not open for further replies.

capdownlondon

Technical User
Mar 4, 2007
9
GB
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
 
You should be able to do this without code. Just use the Mod operator with your running sum text box. The control source of your second text box would be something like:
=(txtRunningSumBox -1) mod 350 +1
You may need to play with this.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top