View Full Version : Multi-Table Query and Calculations


cinders
08-28-2001, 03:12 PM
I have two tables where I would like to subtract field values in one table from field values in another table. Once the calculation is done, I want to take the result and perform another calculation on them

EG:

Answer =[TABLE1]Field A - [TABLE2]Field A

Answer2 = Answer X 1.5

Does anybody have an idea on how to accomplish this

Rich
08-28-2001, 03:23 PM
Use a query in which both tables have been added simply add the calculated fields to the grid.
HTH

shacket
08-28-2001, 03:30 PM
Your tables must be related for Access to know which record in Table 1 and which in Table 2 to obtain. However, if they are, you could simply write the following as a field in your query:

Answer: [Table1Name].[FieldName] - [Table2Name].[FieldName]

For the second answer, you could either write:

Answer2: 1.5*[Answer]

OR

Answer2: 1.5*([Table1Name].[FieldName] - [Table2Name].[FieldName])