Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Handling a yearly Index change calculation field?

Status
Not open for further replies.

vdzr

Technical User
Mar 6, 2003
42
DE
I was thinking to make a table with dates and indexes filtered for each client(record)
The calculated field must look for the last index (start)date before the pc 'now()' date (so you change pc date to see the previous year calculations)

query out the right indexes & date was ok but can I do this with code behind the formcalcultion field? Amount * top index from the query (but in code)

query :SELECT TOP 1 TblWoningverzFaktoren.secIDClient, TblWoningverzFaktoren.Aanvangsdatum, TblWoningverzFaktoren.IndexvanPremiewoningverz, TblWoningverzFaktoren.FaktorvanPremiewoningverz, TblWoningverzFaktoren.IndexvanPremieInhoudVerz, TblWoningverzFaktoren.FaktorvanPremieInhoudVerz, TblWoningverzFaktoren.IndexvanPremieValuables, TblWoningverzFaktoren.FaktorvanPremieValuables, TblWoningverzFaktoren.IndexvanPremieLiability, TblWoningverzFaktoren.FaktorvanPremieLiability, TblWoningverzFaktoren.IndexvanTotPremie, TblWoningverzFaktoren.FaktorvanTotPremie
FROM TblWoningverzFaktoren
WHERE (((TblWoningverzFaktoren.secIDClient)="C2700") AND ((TblWoningverzFaktoren.Aanvangsdatum)<Now()))
ORDER BY TblWoningverzFaktoren.secIDClient, TblWoningverzFaktoren.Aanvangsdatum DESC;
 
so you change pc date to see the previous year calculations

This will cause complications later. How about using a popup box to enter the date.

Ian Mayor (UK)
Program Error
Your lack of planning is not my emergency!
 
How does it go?

I made already a tabform where you can see the date with the different indexes and factors.

clients have different indexes and each year has different indexes.
Each client has about 15 subrecords within each record 4 calculated fields based on the index before a (input)date.
 
In what way there will be complications?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top