Another DSum question

Can someone tell me what is wrong with this code?  Am using it in an unbouse field on a report.

=DSum([Cost],"tblOutpurchase","[EstN] = frmEstimateHeader!txtRealEstN")
SteveL13Asked:
Who is Participating?
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
oops - need double quotes

=DSum("[Cost]","tblOutpurchase","[EstN] = " & Chr(34) & Forms!frmEstimateHeader!txtRealEstN & Chr(34))
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Maybe this - if EstN is Text ?

=DSum([Cost],"tblOutpurchase","[EstN] = " & Chr(34) & Forms!frmEstimateHeader!txtRealEstN & Chr(34))

mx
0
 
SteveL13Author Commented:
Hmmm, I get a "Enter parameter value --  Cost" when I try to run the report.  I know Cost is the field in the table tblOutpurchase.  
0
 
SteveL13Author Commented:
And EstN is a text field.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.