calcualtions using a query

kabir_hussein

Registered User.
Local time
Today, 11:10
Joined
Oct 17, 2003
Messages
191
Hi i have been told that you can do calcualtions using queries. Does anyone know how to do this as this is new to me. I have always done calcualtions using forms/reports

many thanks
 
Just enter in the design grid as follows:

Code:
NameofCaption :  [field1]-[field2]*12

The above would be something like :
Field1 = 100
field2 = 50

Code:
Total : [Field1]-[Field2]*12

This would return the value of 600.
Just put this where the fieldname normally goes.
See attachment

Hope this Helps.


Andy
 

Attachments

  • calculation.jpg
    calculation.jpg
    14.1 KB · Views: 133
Hi many thanks for your help but do you know how you would do a calcualtion which includes a subform. here are the cacluations i am trying to do.

I have added a attachment-this shows the two tables i am trying to calcualte

I am trying to do a calcualtion where i can total the amount of items delivered and do a report to see any outstanding items.

The calculation in volves order quantity(order table), qty delivered, qty rejected and qty accepted(all from order history)

do you know how i could using a query can calcualte the total. I know how to do this on a form but trying to get it onto a report is quite hard

many thanks
 

Attachments

  • calcualtions.jpg
    calcualtions.jpg
    27.2 KB · Views: 127
It doesn't matter whether it's on a subform or not, the data is resident in two different tables. As long as you have a relationship between the tables, just add the fields you require and replace field1 and field 2 with your field names and replace the calculations.

You can uncheck the fields that you are doing a calculation on if you don't want to show them in the query.

HTH

Andy
 

Users who are viewing this thread

Back
Top Bottom