|
-
Mar 26th, 2008, 03:35 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] [02/03] Need help on simple looping...
Elow everyone...it's meh again, i just need a help from those who had kind heart there on how to loop and put it on the textbox...yhe format would be like this..:
on my code i only got the first column loop but how can i do this to other loop this is my code
Code:
Dim i As Integer
For i = 1 To term
ListView2.Items.Add(i)
Next
Terms = 12
Date = Now - 12 (MMM)
Monthly = 125
Terms = 12 Code:
Terms Date Payment Payment made
1 March 125
2 February 125
3 January 125
4 December 125
5 November 125
6 October 125
7 September 125
8 August 125
9 July 125 125
10 June 125 125
11 May 125 125
12 April 125 125
This value will be put on textbox...
Payment made: 500 March:125 February: 125 January: 750 Total Due: 1000
Thanks in advance guys...
Last edited by shyguyjeff; Mar 26th, 2008 at 03:56 AM.
-
Mar 26th, 2008, 03:45 AM
#2
Fanatic Member
Re: [02/03] Need help on simple looping...
where the information about the payment coming from? a database? a text file? an XML document?
-
Mar 26th, 2008, 03:47 AM
#3
Re: [02/03] Need help on simple looping...
vb.net Code:
Dim termCount As Integer = 12 Dim items(termCount - 1) As ListViewItem For index As Integer = 0 To items.GetUpperBound(0) Step 1 items(index) = New ListViewItem(New String() {(index + 1).ToString(), _ Date.Now.AddMonths(-index).ToString("MMM"), _ (125).ToString("c"), _ String.Empty}) Next index Me.ListView1.Items.AddRange(items)
-
Mar 26th, 2008, 03:47 AM
#4
Thread Starter
Hyperactive Member
Re: [02/03] Need help on simple looping...
from monthly...There is a value on it...the monthly there stands for payments...
-
Mar 26th, 2008, 03:49 AM
#5
Thread Starter
Hyperactive Member
Re: [02/03] Need help on simple looping...
tnx jm...it is the one i am looking for...i will try that sample...again thank you...thank you....thank you jm...
-
Mar 26th, 2008, 03:50 AM
#6
Re: [02/03] Need help on simple looping...
Hmmm... didn't read the last couple of lines properly. Split the string on the colons, then split each substring on spaces. You'll end up with a pair of strings for each month where one is the amount paid and the other is the month. You could put them in a Hashtable and then instead of using String.Empty as I did in my code you could get the payment value from the Hashtable.
-
Mar 26th, 2008, 07:53 PM
#7
Thread Starter
Hyperactive Member
Re: [RESOLVED] [02/03] Need help on simple looping...
ok jm i can do that already...Thanks again jm..God Bless and have a nice day...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|