Another DSum Problem

  • Thread starter Thread starter swichman
  • Start date Start date
S

swichman

I hate the syntax requirements on these stupid things...
Can anybody tell me what is wrong with the following:
=DSum("[QuantityRevision]*[UP]","Quantity Adjustments","[SCO] = -1 And
[PCOFinal] = 0 And [Group1D] Is Null " And [ContractID]=" &
[ContractID] And [ItemNum] = '" & [ItemNum] & "'")
It is not working and it has somethng to do with " And [ContractID] = "
& [ContractID]
ContractID is a Long Integer.
Thanks for any help.
 
=DSum("[QuantityRevision]*[UP]","Quantity Adjustments","[SCO] = -1 And
[PCOFinal] = 0 And [Group1D] Is Null And [ContractID]=" &
[ContractID] & " And [ItemNum] = '" & [ItemNum] & "'")

This assumes that ContractID is a number and ItemNum is text

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
Back
Top