Wrox Programmer Forums
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 27th, 2007, 05:50 AM
Registered User
 
Join Date: Jul 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Do Loop?

Hello all
I need to create an ACCESS-VBA algorithm which is creating a few difficulties.
I have 2 tables:
1)Pool1= is dynamic and contains the current list of "ID" at a certain Test-date
2)HUB= Static table with all the ID available in the database and the relative information

-> Every ID is related to a value which express the SERVICER-BANK.
The test is willing to evaluate the impact of the most redundant SERVICER-BANK within the portfolio at a certain date...
...Translated: I need to
1- Check all the SERVICERS related to each ID of the table POOL1
2- Sum the relative ID-amounts which have common SERVICER.
3-Write the percentage of the the servicer which has the greater impact in the portfolio POOL1(in terms of AMOUNT of MONEY: so that 1 Servicer with an amount of 1million has a greater impact than 5 IDs with the same servicer but an amount of 100.000 each)

I would like to avoid to save the name of each servicer for the ID in Pool1 and update the amount of each of thus due to the size of the tables.

My idea is:
-I start reading each ID of POOL1 with a Do-Loop and I look for the correspondent information for that ID in HUB (with another DO-LOOP)
-I keep scrolling Pool1 saving all the relative amounts for the same servicer...once at the end of the table: I save the total amount for the [articular SERVICER in a variable, and I restart reading Pool1 starting from the following ID with a different servicer than the one I analysed previously.

The problem arises from the fact that I don't know how to save the position of the ID read in POOL1, and anyway: Once I am reading any ID of POOL1 everytime I should read again all the other previous ID to re-sum all the servicers repeated until the end of the table.

I thank in advance everyone who will try to give a solution to this problem.
Have fun
E.M.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with for-each loop athanatos XSLT 0 April 10th, 2006 07:20 PM
Do Until loop with IF crmpicco Classic ASP Databases 2 June 15th, 2005 05:35 PM
For....Loop kliu9 Excel VBA 5 February 10th, 2005 06:43 AM
Do Loop junemo Beginning PHP 8 July 28th, 2004 02:58 AM
nested while loop doesn't loop hosefo81 PHP Databases 5 November 12th, 2003 08:46 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.