Using one calculation in another

B

BarbaraP

I have only one table that I am working with. I have space for entry of make
and model for up to four vehicles (Vehicle1, Vehicle2, Vehicle3, and
Vehicle4). In a report, I need a total number of vehicles entered. I did a
count of each vehicle:

TotalV1: Vehicle1 (count), TotalV2: Vehicle2 (count), TotalV3: Vehicle3
(count), and TotalV4: Vehicle4 (count).

I then created a TOTALVEHICLES: sum([TotalV1]+[TotalV2]+[TotalV3]+[TotalV4].

If I leave the "Show" checked for the individual "totals," I am told that
there are no fields that can be added to my report. When I return to the
quiry and uncheck the "Show" I get the field TOTALVEHICLES, but when I add it
to the report, save, and run the report, it asks me for TotalV1, TotalV2,
etc. When I go back to the quiry, I see that the fields TotalV1, TotalV2,
etc. are no longer there.

This may be very basic, but I'm lost as to how to get it to count the four
fields through all records and then sum the counts.

Thanks for any help.
 
K

KARL DEWEY

TOTALVEHICLES: sum([TotalV1]+[TotalV2]+[TotalV3]+[TotalV4].
You can not use alaises in the same query that created them. Use the raw
data (actual field names from the table) in the calculation.

Your table structure is wrong as it is like a spreadsheet. Use a separate
record for each vehicle.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top