473,399 Members | 2,278 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,399 software developers and data experts.

how to calculate due dates of premium and update status for future

5
Good Day..
Its my very first database project and I am really excited about it, trying to make for myself… I am an insurance manager and also learning access through free resources like training videos on youtube etc.. kindly help me on my problem
Two Tables, tblContributionRegister & tblAgentDetails.
tblContributionRegister has fields like.. Prospect_Name (text), Proposal_No (text), Policy_No (text), Submission_Date (Date/time), Issued_Date (date/time), Payment_Mode (combo box, list values are Monthly, Quarterly, Half Yearly, Yearly), Insurance_Term (number), Amount (number), Agent_ID (number)
tblAgentDetails has fields… Agent_Name (text), Agent_Code (text), Contact_No (text), Joining_Date (date/time)

I want……!
1- Lets say a personA is paying in quarterly mode and his issued_Date is 12-jan-2009. It means that his next payments will be 12-apr-2009, 12-jul-2009, 12-oct-2009 and so on. Another personB with Half Yearly mode of payment has Issued_Date 15-jan-2009 so his next payment dates would be 15-jul-2009, 15-jan-2010 and so on.

Ø if I want to see on 28th-jun-2009 that who is due between 01-jul-2009 to 31-aug-2009 then results should be PersonA 12-jul-2009 and PersonB 15-jul-2009.

Ø If I want to see on 28th-jun-2009, payment history of 1-jan-2009 to 28th-jun-2009 then results should be like this…..
PersonA 12-jan-2009 paid
PersonA 12-apr-2009 Pending
PersonB 15-jan-2009 paid

If personA pays today for his pending payment of 12-apr-2009 than I will update his status to paid.

Looking for step by step procedure to do this all. I am working in Ms Access 2007
Lot of thanks in advance
Attached Files
File Type: zip rmchDB.zip (13.5 KB, 171 views)
Jun 27 '11 #1

✓ answered by Rabbit

You create the third table the same way you created your other tables. You'll probably want the following fields:
Expand|Select|Wrap|Line Numbers
  1. PaymentID - Autonumber
  2. ContributionRegisterID - Whatever unique ID you are using for the Contribution Register table.
  3. DatePaymentMade - Date payment received
  4. DatePaymentFor - Date for payment period
  5. PaymentAmount
  6.  
After that point, you have a few choices to track things. You could insert a new payment record after each payment is made that will have the date of the next payment. Or you could use the algorithm described earlier to determine whether someone has a payment due during the month you choose.

6 4234
Rabbit
12,516 Expert Mod 8TB
If you take the month number that you want to look at, you can use mod to determine if they have a payment due.

What you do is take the month number you want to look at, subtract the month number of their issue date, and then mod x. If it's equal to 0, then they have a payment due.

x is equal to
Monthly = 1
Quarterly = 3
Half Yearly = 6
Yearly = 12

As for the second thing you want, you will need to create a third table to log payments. Then it's a simple matter of creating a query with a where clause.
Jun 27 '11 #2
rmch
5
lot of thanks for replying, i think we are on track but i am new to access and can't understand what to do with all this practically, kindly write step by step procedure. i am thankful for your kind support
Jun 28 '11 #3
Rabbit
12,516 Expert Mod 8TB
Giving someone the whole answer isn't my method of choice. Rather I point you in the right direction, you put in the work to understand and learn it, and you ask for clarification on specific points if you run into trouble while showing what you've attempted.
Jun 28 '11 #4
rmch
5
I am really excited about access and trying best to solve this, what i have done is....

I used this code in query…
Expand|Select|Wrap|Line Numbers
  1. SELECT tblContributionRegister.*,
  2. IIf([Payment_Mode]="Monthly",DateAdd("m",1,[Issued_Date]),
  3. IIf([Payment_Mode]="Quarterly",DateAdd("m",3,[Issued_Date]),
  4. IIf([Payment_Mode]="Half Yearly",DateAdd("m",6,[Issued_Date]),
  5. IIf([Payment_Mode]="Yearly",DateAdd("m",12,[Issued_Date]))))) AS Issued_Date_Plus, *
  6. FROM tblContributionRegister;
Dates in Issued_Date_Plus are my desired dates. Now if a person pays premium on his due date how will I store this information for my later view. Also after payment this query should show me next due of certain person. eg. if personA has issued date 12-jan-2011 and mode is Quarterly, it means his next due will be 14-Apr-2011, so if he pays his due payment how would I update his status and save it for later view? Also how its possible that next time when I will run query the due date should be 14-July_2011.
Waiting your kind reply, kindly guide me how to create third table to log payments. i am not finding solution... plz
Jun 29 '11 #5
Rabbit
12,516 Expert Mod 8TB
You create the third table the same way you created your other tables. You'll probably want the following fields:
Expand|Select|Wrap|Line Numbers
  1. PaymentID - Autonumber
  2. ContributionRegisterID - Whatever unique ID you are using for the Contribution Register table.
  3. DatePaymentMade - Date payment received
  4. DatePaymentFor - Date for payment period
  5. PaymentAmount
  6.  
After that point, you have a few choices to track things. You could insert a new payment record after each payment is made that will have the date of the next payment. Or you could use the algorithm described earlier to determine whether someone has a payment due during the month you choose.
Jun 29 '11 #6
rmch
5
Thanks lot Rabbit. It is working, wowwww. I am really thankful for your kind support
Jun 30 '11 #7

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

Similar topics

8
by: Bob Stearns | last post by:
My client wants to disallow a birth date in the future. First I tried the obvious: ALTER TABLE IS3.ANIMALS ADD CONSTRAINT b_d_f CHECK (birth_date<=current_date) It failed because special...
1
by: Karen Price | last post by:
I am trying to calculate dates by having a beginning date and adding the applicable number of months and coming up with a new date. EX: Original Date = 06/09/06 and need to add three months to...
1
by: jcsquire | last post by:
Here's an odd one: I'm performing a numeric analysis that takes almost a minute to run. I'd like to post feedback about how its progressing to a status bar. Unfortunately, the computation seems to...
4
by: neilj | last post by:
I would like to create a field that calculates a date that is 39 months from a date I am entering on a form. Once I fill in a date in a field, I would like to have Access calculate the next field...
12
by: shane.taylor81 | last post by:
Consider the following table Customer custId char(10) accountExpiryDate datetime accountStatus bit Now, I want to update the accountStatus to False as soon as the current date becomes...
1
by: favor08 | last post by:
have serval date fields in my table that i need to perform calcualations to bring bring a certain # of items. Fields: RptDte Date filed closed always the last date of previous month--- 6/30 for...
6
by: vikasr2002 | last post by:
I have two columns in one table in database. 1. Status 2. DateCreated Now if Todays date is one year after datecreated then change the Status to deleted. How is it possible in SQL Server...
1
by: Roland | last post by:
Hello, I am writing modal dialog box to display progress of downloading file. I am starting download of a file in constructor of dialog using some asynchronous method call which returns me an...
1
paulrajj
by: paulrajj | last post by:
Hi, I am working on my project which is a chat online script using php and javascript. I am maintaining users online_status who gets logged in to chat through session and updating their status to...
19
Breeves22
by: Breeves22 | last post by:
Hi all, I was wondering if it was possible to use Access 2000 to auto calculate a date in a field operating under a 5 day working week Thankyou in advance
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.