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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dsum and Dlookup at same time?

Status
Not open for further replies.

wshm

Programmer
Dec 7, 2006
62
US
I have one problem with this coding.

This form is a continuous form and same Sum are being
returned with this coding.

I need to sum all 'actprod' that have same 'deptbudno' or return 0 if null.

right now, every record is returning same "169" where its
only true for a1(deptbudno).

ie. a1 | 169
a2 | 169
etc

Me.txtActProd = DSum("actprod", "tbl_deptprogoalupdate", "deptbudno = '" & Me![txtDeptBudNo] & "'")

do i need to use another method?
 
every record is returning same
Standard behaviour for an unbound control in the detail section of a continuous form.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
how can I bound this text box? its from another table
I have dlookup function tied to that text box.

Me.txtEstUnitCost = DLookup("estunitcost", "tbl_Estunitcost", "deptbudno = '" & Me![txtDeptBudNo] & "'")
Me.txtEstUnitCost.Requery
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top