Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


Please check


Please check

Author
Message
chaw12
chaw12
Forum God
Forum God (21K reputation)Forum God (21K reputation)Forum God (21K reputation)Forum God (21K reputation)Forum God (21K reputation)Forum God (21K reputation)Forum God (21K reputation)Forum God (21K reputation)Forum God (21K reputation)

Group: Forum Members
Posts: 70, Visits: 232
Hi....



i am making a project, and its about Credit management which will be use by my mother to monitor all those persons status that borrowed money from her. HA!HA!HA!.. and of course not all of them can manage to pay us the exact amount on time that's why i am making this project to help her monitor the payment. but i am having a problem on my code. please check below example:



name borrowed amt date NOTE: date is the day when they

person1 1000.00 1/29/11 borrowed the money

person1 170.00 2/01/11

person2 1500.00 2/01/11



on 1st payment let say person1 manage only to pay 150.00 for the date of 1/29/11 and failed to pay the date 2/01/11 and person2 manage to pay the total of 1500.00





Name Status collected Balance

Person1 Partial 150.00 850.00

Unpaid 0.00 170.00

Person2 Cleared 1500.00 0.00





and on 2nd payment Person1 manage to pay the balance of 1020.00.



so when my mother enter the name of Person1 the 2 record will show on listview and of course my mother will just type in the total balance 1020.00 for payment. and all record that will appear on listview will be save on database.. so the record of Person1 will now be.



Name Status collected Balance Note: i want to show the his-

Person1 Partial 150.00 850.00 tory of payment so it

Unpaid 0.00 170.00 should be like this.



Cleared 850.00 0.00

Cleared 170.00 0.00



Now, my prob. is, if the status of the person is on Partial, i just dont know how will i copy/save the Balance Amt to be the amount of collected (please check the amt. 850.00). since i want my mother to just enter the total Amt. balance on a textbox. ive been working on this for 1 week now trying to get the solution but i just dont have the luck. My code is below.

With rs

.Open "SELECT * FROM table1", conn, 1, 2



For x = 1 To lv.ListItems.Count

.AddNew

!name = text1.Text

!Status = lv.ListItems(x).SubItems(1)

!Collected = ?



!balance = "0.00"

.Update

.Requery 1



Next



.Close



End With



i dont now what will input on Field Collected. i already do all the possible ways but i just cant get it. can someone there give me the idea. im not asking for the code but just the idea.



thank you
Perrie
Perrie
Forum God
Forum God (3.8K reputation)Forum God (3.8K reputation)Forum God (3.8K reputation)Forum God (3.8K reputation)Forum God (3.8K reputation)Forum God (3.8K reputation)Forum God (3.8K reputation)Forum God (3.8K reputation)Forum God (3.8K reputation)

Group: Forum Members
Posts: 13, Visits: 308
Not sure exactly what sort of database or language you are applying but I get the idea of what your trying to acheive.

I would seperate the individual client from the payments and put them on seperate tables.

ie Table1 Person Name, address, contact details plus a unique record ID

Table 2 Record ID, Amount (Negative value for money borrowed, positive for money repaid), Date of transaction and finally a the record ID of the person this transaction relates to.

from that a simple search of all transactions related to a selected persons ID summed up will result in a current balance owing and a search of most recent date with a positive transaction amount

will yeild last payment made.

Hope this helps.

chaw12
chaw12
Forum God
Forum God (21K reputation)Forum God (21K reputation)Forum God (21K reputation)Forum God (21K reputation)Forum God (21K reputation)Forum God (21K reputation)Forum God (21K reputation)Forum God (21K reputation)Forum God (21K reputation)

Group: Forum Members
Posts: 70, Visits: 232
thanks for your reply..



i already found a solution to it and i done it the same way you comment to it.



thank you...
GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search