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

add column A UNTIL it reaches B value and return column A values

Status
Not open for further replies.

RBE

Programmer
May 25, 2000
72
US
I need to fill a report field with a list of values that are the sum total of a given value on a form tied to a qurey, and if the total dosn't balance then I need it to take the next value in the recordset and apply that to the remainder(this part I can do). All it needs to do is add down the column until the sum total is <= the forms field value. This does not seem like it should be that hard but it has me stumped. I have tryed many different ways to do this, do loop....until, Ifs, and expressions (all probably written wrong), but to no avail. Please Help!!!!
Thanks in advance
RBE
 
why doesn't this logic work?
do until (sum total) <= (forms field value)
loop
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top