I agree, the arguments look OK.
So try this (note - using ELOOKUP() ):
Code:
=ELookup("[SumOfNeedThingy]","qryNeededThingiesByThingyCode",
"[UserName]='Smith'")
Replace "Smith" with a name you know is in the query. If that returns a value, try:
Code:
=ELookup("[SumOfNeedThingy]","qryNeededThingiesByThingyCode", "[ThingyCode]=21")
If both of the above returned values, finally try:
Code:
=ELookup("[SumOfNeedThingy]","qryNeededThingiesByThingyCode", "[UserName]='Smith' And [ThingyCode]=21")
Again, replace "Smith" with a name you know is in the recordset (domain).
If you get errors, then put a breakpoint at the start of the ELOOKUP function and single step thru the code, looking at the variables. You should find where the problem is...
It would help if you have a demo mdb......