open a form and decrement a record value by 1

psprakki

New member
Local time
Today, 20:52
Joined
Apr 20, 2013
Messages
4
I am new to VBA. I have a recovery table - tblRecovery, and I open it by using a form - frmRecovery, when ever I open this form and click 'Run Recovery"command in that form, then the out standing amount should be decreased by an EMI amount and Remaining months should be decreased by 1 .
kindly help me to write this in VBA code
 
Kindly show us some tables and values and some of the code you are using.
 
i have 2 tables-tblEmpDetails, tblRecovery and a query-qrySalary . with the emp details , I calculate the Gross salary and from Recovery table I get the deductions of a loan taken.
For preparing the salary of a particular employee, first I calculate recovery from recovery table form, ie., the 'outstanding amount' will become 'outstanding-EMI' and 'EMI=EMI-1", till it becomes zero. These details are called in a query-qrySalary and I prepare the Salary details , which shows Gross, Deductions and Net salary, in detail. I want to run the recovery from vbcode as soon as I enter the details in emp table and save it. I used a command button 'Save'. when I press this button, automatically it should run the recovery calculation, if any, that I will mention in Emp table itself and update that table.. later I open the query salary and take the report/payslip of that particular employee.

sorry for my bad english and I would like to say that I haven't written any code till now, in this regard. as I told earlier I am entirely new to VB and at basic level end. kindly help in all aspects with all possibilities
 

Users who are viewing this thread

Back
Top Bottom