Using Calculated Fields to Calculate other fields

C

Clint Marshall

In Access XP, I'm trying to use the values of several calculated fields to
create additional calculated fields, all within one query.

Is there a way to do this? Access currently doesn't recognize the names of
the calculated fields created earlier in the query.

Thanks!
 
R

Rick B

Just include the actual formula.

If Z = A+B
and Y = D+G

and X = Z-Y (using other calculated values)

Then use...

X = (A+B) - (D+G)
 
C

Clint Marshall

Some of my formulas are dreadfully long. Is there any other way to include
the value I've already calculated?

eg:

Thanks!

RentPerRSF:
((nz([RentAndCAMAmt],0)+nz([RentInclCAMAmt],0)+nz([CAMAmt],0))+([Tax
Amount]-[Base Full Year RE Taxes]+[Special Assessment]-[Base Full Year
Special Assessment])*nz([Proportionate Share],0))/[sq ft per lease]
 
M

[MVP] S.Clark

With a subquery, the answer is probably yes. I try to avoid subqueries, as
it's difficult to verify, debug, and maintain.

I typically make a base query with the first calcs, then a 2nd query to do
the addtional calcs.

This is typical with percentages. Get the 'whole' in one query and the parts
in another, linking the 'whole' query to it.

--
Steve Clark, Access MVP
FMS, Inc.
Call us for all of your Access Development Needs!
1-888-220-6234
[email protected]
www.fmsinc.com/consulting
 
C

Clint Marshall

Thanks.
Not the answer I was hoping for, but at least I know where I stand.

-Clint
 
Top