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

nested finds

Status
Not open for further replies.

WaltLukeIII

Programmer
Jun 28, 2000
199
US
I have a vb module that I want to set some subTotals. In this module I want search on one main catagory, a number, a second catagory, a location, and a third catagory a level. <br><br>right now I am trying to use find and findnext inside of a do while loop but it is not working. <br>I want to get all the records with the main number then narrow it down by location and level set all of those records then get the next level at the same location. repeat until all levels are set then get the next location and repeat the process for the levels until all the locations are finished. Sorry the explanation is so long. <p>Walt III<br><a href=mailto:SAElukewl@netscape.net>SAElukewl@netscape.net</a><br><a href=
 
Just curious why you're taking this approach. You can set subtotals by group etc. directly in reports, if that's what you're after.
 
From you explanation it seems to me you could open a recordset that groups on those three categories (Ascending or Descending) and sums the corresponding field.&nbsp;&nbsp;As a result the subtotals would be inherent in the recordset allowing you to iterate over it and pull out the summed field.&nbsp;&nbsp;Or is there more to it? <p>-Chopper<br><a href=mailto: > </a><br><a href= > </a><br>
 
I want to save these totals in a table field. I am not sure the best way to do that I currently have a form where they can input information and then push a button and get these totals calculated. <p>Walt III<br><a href=mailto:SAElukewl@netscape.net>SAElukewl@netscape.net</a><br><a href=
 
In case you were not aware, it's generally recommended you do not store results of calculations in tables, but recalc them on every form or report used. Hey, I'm no help at all today :)
 
I thought about that but the company that&nbsp;&nbsp;I am writing this for would like it stored somewhere so... Thanks for the advice and assistance <p>Walt III<br><a href=mailto:SAElukewl@netscape.net>SAElukewl@netscape.net</a><br><a href=
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top