Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Dsum in TextBox 1

Status
Not open for further replies.

rccline

Technical User
Jun 13, 2002
341
US
I am at a loss to get Dsum to work on my form.
FieldName represents a number.

Code:
=Dsum("[fieldname]","[qryName]", "[criteria]")

where the critea is "[FieldName2]=[form name].Form![control name]

If I use as criteria: "[FieldName]=1" I get an answer.
If I use the following criteria, I get Error as a result.

Code:
=Dsum("[FieldName]","[qryName]", "[FieldName]=[form name].Form![control name]")

I need to show the sum of the [FieldName] where the form is showing the record ID displayed in [control name] on the form.



Thank you.

Robert
 
=Dsum("[FieldName]","[qryName]","[FieldName]=" & Forms![mainform name]![control name])

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top