Hello Sir,
i want to deduct some amount(i.e user input) from main loan taken by employee and remaining amount again come as balance loan amount and on nxt month again the some amount should deduct from balance loan amount.

my database is in ms-access and i use vb.net..

plz help......

i created loan table, and i m fetching loan amount of each employee in a label to see d actual loan amount then i have one text box where user will insert amount and remaining amount on deduction come in another label as balance amount.

i created loan table, and i m fetching loan amount of each employee in a label to see d actual loan amount then i have one text box where user will insert amount and remaining amount on deduction come in another label as balance amount.

Hi wenbnet,

You have a database for several employees (several records) and for each employee you you have several columns for the loan amount.

Where does the loan amount and insert amount comes from....

You see a lot of questions.

Can you show us your codes and what errors do you have.

ok this is my code.

ccn = New OleDbConnection(ACCESS_CONNECTION_STRING)
            ccn.Open()
            cmdsql = New OleDbCommand(loanstr, ccn)
            drloan = cmdsql.ExecuteReader()
            drloan.Read()
            Label3.Text = Format(Convert.ToDouble(drloan.Item("current_loan").ToString()))
            lblbalance.Text = Format(Convert.ToDouble(drloan.Item("current_loan").ToString()))
            ' lblbalance.Text = Format(Convert.ToDouble(lblbalance.Text - txtdeposit.Text).ToString())
            drloan.Close()
            ccn.Close()


 Private Sub btnsubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsubmit.Click

        lblbalance.Text = lblbalance.Text - txtdeposit.Text
    End Sub
This article has been dead for over six months. Start a new discussion instead.