expressions - using 'sum'

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
Is it possible to calculate the sum total of a field in a table to display
it in a form, but with an additional exception rule.

The exception rule i need to apply is that only records that share the same
value in a secodary field are calculated.

Hope this makes it a little clearer...

I have used =sum([Field2]) on the masterForm in a text field that
calculates all data in Field2.

What i want to do if it is possible is to sum Field2 on the masterForm but
only if masterForm!Field1 is equal to subForm!Field1


Any help very much appreciated...
 
Lee,

<<sum Field2 on the masterForm but only if masterForm!Field1 is equal to
subForm!Field1>>
DSum("[Field2]","tblMyTable", Forms!MasterForm!Field1 =
Forms!MasterForm!subForm.Form!Field1)

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
Back
Top