DSum with three criteria (1 Viewer)

Lkwdmntr

Registered User.
Local time
Today, 05:49
Joined
Jul 10, 2019
Messages
281
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!
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:49
Joined
Oct 29, 2018
Messages
21,496
Hi. I don't see anything wrong with it.
 

Lkwdmntr

Registered User.
Local time
Today, 05:49
Joined
Jul 10, 2019
Messages
281
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!
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:49
Joined
Oct 29, 2018
Messages
21,496
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.
 

Gasman

Enthusiastic Amateur
Local time
Today, 13:49
Joined
Sep 21, 2011
Messages
14,362
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

Top Bottom