DSum with three criteria

Lkwdmntr

Registered User.
Local time
Today, 05:37
Joined
Jul 10, 2019
Messages
311
Hello, could someone tell me what I did wrong here. These statements are a bit tricky with the syntax. It was working once and I forgot to save it and now I can't get it to work again. I'm probably just overlooking something simple. Here is the code.

Code:
=Abs(DSum("ActionIncluded","qlkpDetail","[WeeklyPlanIDFK]=" & [Forms]![frmWeeklyPlans]![txtWeeklyPlanID] & " and [ActionCategoryFK] <> 'Home Medical' and [ActionCategoryFK] <> 'Meals'"))-10

Thanks!
 
Hi. I don't see anything wrong with it.
 
Hi. I don't see anything wrong with it.
That's what I thought, I must have looked at the calculations wrong. Sorry! You'll be seeing a response from my other post as soon as I get this DB cut down a little. Thanks again!
 
That's what I thought, I must have looked at the calculations wrong. Sorry! You'll be seeing a response from my other post as soon as I get this DB cut down a little. Thanks again!
The expression itself is syntactically correct. If the result is incorrect, then the logic may be faulty. We can't say for sure until we see what you got.
 
Would FKs actually be text?, I'd *assume* they would be autonumber ID values.?

Do you have lookups fields for those in your table?
 

Users who are viewing this thread

Back
Top Bottom