Hello every one.
I have a form in VB.Net, as attached, I need to code the OK button.
The Transfer From combobox and Transfer To combobox get all there values from the same table. The amount being transfered is keyed in via a textbox.
Once the amount has been transferred, both values should be updated i.e Transfer From value should decrease while Transfer To value should increase. Remember, it is using one table (single table) whose information should be updated whenever a transaction occurs.
How do I overcome this?

Recommended Answers

All 2 Replies

I don't see anything atttached here. Also, show your code or we can't help much.

The first step is to declare an integer variable which will hold the amount of which you will deduct (minus) the amount to be transferred. Also you need to convert the data retrieved to integer so that you will be able to do deductions.

After that you will need to first do similar thing, create another integer variable to hold the amount that is currently on the Transfer To form then add that amount with the amount deducted and then push/update the Transfer To amount with the total calculated.

That's how to achieve what you want or use hidden labels.

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.