T
Ted Allen
Hi Kathy,
I don't really understand the relationship between your
two tables. Is the inception table just used to specify
the start month and value? If so, you could get rid of
the reference to the table and use parameters instead.
Or, just enter the criteria directly.
As far as referencing the value of the previous record,
you can't do that. Instead, what you would normally do
is use DSum() or a subquery to calculate the sum of all
earlier TotRet fields (which you could then add to your
baseline value if you wish). But, based on your example,
this could be tricky depending on your date's field
type.
In your example you listed 9/1984 and 10/1984 as dates.
Are the entries in these fields date values formatted to
m/yyyy, or are they just text entries? If they are text
entries, you will need to parse the month and year in
your DSum() or subquery criteria in order to determine if
the record is older.
Please post back with clarification and I will try to
provide more help.
-Ted Allen
starting point in a particular month (9/1984) in the
IDTotRet field. I need to calculate a figure based on
two fields so that it picks up the number from the
previous month/year record.
field would be 101.27. [IDTotRet]*(1+[TotRet]).
101.27 - that was calculated for the previous month and
perform the same calculation for that month. In this
instance, the IDTotRet calculated for 10/1984 was
101.27. The TotRet for 11/1984 was 0.91%, what I want in
my new field would be 102.19.
I don't really understand the relationship between your
two tables. Is the inception table just used to specify
the start month and value? If so, you could get rid of
the reference to the table and use parameters instead.
Or, just enter the criteria directly.
As far as referencing the value of the previous record,
you can't do that. Instead, what you would normally do
is use DSum() or a subquery to calculate the sum of all
earlier TotRet fields (which you could then add to your
baseline value if you wish). But, based on your example,
this could be tricky depending on your date's field
type.
In your example you listed 9/1984 and 10/1984 as dates.
Are the entries in these fields date values formatted to
m/yyyy, or are they just text entries? If they are text
entries, you will need to parse the month and year in
your DSum() or subquery criteria in order to determine if
the record is older.
Please post back with clarification and I will try to
provide more help.
-Ted Allen
together by the Month and Year in order to have a 100%-----Original Message-----
I have a query that joins two tables. They are joined
starting point in a particular month (9/1984) in the
IDTotRet field. I need to calculate a figure based on
two fields so that it picks up the number from the
previous month/year record.
the TotRet for 10/1984 were 1.27%, what I want in my newComposite Table: contains fields - month, year, TotRet
Inception Table: contains fields - month, year, IDTotRet
For example, if the IDTotRet for 9/1984 were 100% and
field would be 101.27. [IDTotRet]*(1+[TotRet]).
the calculation in the new field for 10/1984 - theNow for the next month, I want the expression to pick up
101.27 - that was calculated for the previous month and
perform the same calculation for that month. In this
instance, the IDTotRet calculated for 10/1984 was
101.27. The TotRet for 11/1984 was 0.91%, what I want in
my new field would be 102.19.
And [Year]=1984,100,[IDTotRet]*(1+[TotRet]))I started with this expression ITotRet: IIf([Month]=9
to get it to pick up from the previous record.However, I donâ?Tt know where to include the information