Correct Syntax

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Can anyone provide me with the correct syntax for the
control source of a report text box. Below is what I
want to do, but I keep getting syntax errors

jobno is text field in a query
txtjob1 is a text field in a form
FPI is a numeric field in the same query

=sum(Abs([FPI]=5)) where (jobno = forms!frmFPISelect1!
txtjob1)

Any help would be greatly appreciated

Thanks
Bill
 
You need to use the Domain aggregate function: DSum.
That takes 3 parameters, the field to sum, the
table/query to look in, and the criteria. The parameters
need to be quoted. You will then need to enter your
criteria with quotes since jobno is text like
this: "jobno = '" & forms ... & "'"
Hope this helps. j.
 
Back
Top