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......

What did you try? It sounds like the loans are going down and down :)

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.

so what is the problem ?

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

bt deducted amount is nt saving as permanently as balance amount

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.