473,322 Members | 1,690 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

How to replace a value while Edit?

Hi,

I am currently building a Loan Database for my office.
I have two tables; tblCustomer (with general Customer details)

and tblLoan (fields such as LoanAmount, LoanDate, Interest, InterestAmount, PreviousArrears, InterestPaidLastMonth,InterestBalance,TotalArrears and so on).

I could not come up with a solution for replacing the value for the field PreviousArrears in tblLoan.

PreviousArrears is the amount that was not paid until last month.
TotalArrears is sum of all balanced amount yet to be paid (it includes sum of PreviousArrears, Otherfees and InterestBalance)

I dont hav problem to enter the values for the first time. everything is working fine. but for the next month, if the customer paid the interest amount, then i need to make the corresponding changes.

say, the Total Arrears for the month of June is $100, i want that value to be replaced in PreviousArrears field if i try to enter values for the next month (July).

so that, PreviousArrears field will be $100 and TotalArrears Value will be changed to the new value based on PreviousArrears, Otherfees and InterestBalance

Need your assistance.

thanks,
Jul 25 '07 #1
5 1592
MMcCarthy
14,534 Expert Mod 8TB
The problem here is you are trying to store calculated amounts. These are normally calculated dynamically on a form or report but not stored in the database for the very reasons you've outlined.

Calculated values that are subject to change are a problem because it is very difficult to keep data integrity with them. How and when to trigger the update becomes a major issue.
Jul 26 '07 #2
Hi Mmccarthy,

thanks a lot for your reply.

the calculated value , in this case, does not affect the data i entered in a record.

the client pays the loan in an installment basis and all the interest amount which he pays every month must be in the database.

say, the customer XYZ is paying an interest of $100 every month. so,for the month August, if he pays just $80 then the arrears would be $20.

So for the month September, he should pay $120 (Interest + Arrears frm previous month)

I want the arrears information to be recorded when i attempt to enter the information for Spetember.

Could you please help me how should i get this done or please tell me if i did not understand what you have mentioned earlier.

thanks n regards,
Kathy
Jul 26 '07 #3
MMcCarthy
14,534 Expert Mod 8TB
Hi Mmccarthy,

thanks a lot for your reply.

the calculated value , in this case, does not affect the data i entered in a record.

the client pays the loan in an installment basis and all the interest amount which he pays every month must be in the database.

say, the customer XYZ is paying an interest of $100 every month. so,for the month August, if he pays just $80 then the arrears would be $20.

So for the month September, he should pay $120 (Interest + Arrears frm previous month)

I want the arrears information to be recorded when i attempt to enter the information for Spetember.

Could you please help me how should i get this done or please tell me if i did not understand what you have mentioned earlier.

thanks n regards,
Kathy
The problem here is you can't just look at the record for the previous month. You need to identify this record somehow.

Assuming there is a record for June, what is the datefield that identifies this and how is that date stored?

How are new records added? For instance when you add the record for July do you do it through a form?
Jul 26 '07 #4
yes, PK for tblCustomer is Loan Number
PK for tblLoan is LoanID

the relationship between them is 1 to many .

i enter Customer details in frmCustomer and i have a button called "Enter Loan Info". when i press the button, it will open a form called frmLoan . when it opens, it updates the general fields like FirstName, LastName,Loan Number, Loan Amount from frmCustomer.

i hope you get an idea now.

thanks,
Kathy
Jul 26 '07 #5
Also, I identify a record based on a query which prompts the user to enter the LoanNumber and Month.

i have a autonumber field LoanID for tblLoan. i need to find the last record entered for particulat loan number and somehow i must retreive the value for TotalArrears.
Once i get the data, i should update that value into Previous Arrears field when i attempt to enter new record for the same loan number.

i dont know how to acheive this.

Kathy
Jul 26 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Xah Lee | last post by:
suppose you want to do find & replace of string of all files in a directory. here's the code: ©# -*- coding: utf-8 -*- ©# Python © ©import os,sys © ©mydir= '/Users/t/web'
3
by: tchurm | last post by:
Hi Pythonistas, Here's my problem: I'm using a version of MOOX Firefox (http://moox.ws/tech/mozilla/) that's been modified to run completely from a USB Stick. It works fine, except when I...
1
by: Dan | last post by:
Anyone know how to invoke the .NET Replace dialog thorugh code (say, from within an addin)? More specifically, I'm trying to open the replace dialog with some pre-set parameters (such as FindText...
0
by: San Diego Guy | last post by:
Hi all! I have Datagrid. Within that datagrid I have a drop down list that I set up some values in (a "collection") I set up an edit command column on the datagrid and wrote simple code to get...
1
by: sck10 | last post by:
Hello, I am trying to change a value when a user goes into edit mode on a DetailsView control. I am trying to use the following, but can not figure out how to get to the bound field...
5
by: Jim | last post by:
Below is my code, I'm opening an xml file and I have a chat name node within it. By default the node has a value of "mypc" for which I'm replacing and putting in a new value. I don't know if this...
4
by: moondaddy | last post by:
I need to edit the text in many files so I'm writing a small routine to do this. First I have a method that loops through all the files in a directory and passes the full file path to another...
5
by: kickergirl | last post by:
I have created a form to allow users to add a new record and/or search for an existing record based on SSN. If the SSN the user enters into SrchID_text is found, the form is populated and a message...
6
by: simon.robin.jackson | last post by:
Ok. I need to develop a macro/vba code to do the following. There are at least 300 corrections and its expected for this to happen a lot more in the future. Therefore id like a nice...
3
by: Compufix | last post by:
I am trying to edit a file in place.....it is the /etc/master.passwd in OSX I need to push out a script that adds a crypt password for root. The file by default has an * so the line starts with ...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.