Solved stuck on simple issue (1 Viewer)

TipsyWolf

Member
Local time
Today, 22:08
Joined
Mar 20, 2024
Messages
117
hey guys, im stuck at very simple step
i have a bextbox that shows me a number accoring control sorce
Code:
=IIf(DCount("site";"QddallA";"site='Site1' and status not in = 'Rejected' and duedate<completedDate")=0;"";DCount("site";"QddallA";"site='Site1' and status not in = 'Rejected' and duedate<completedDate"))

i tried
status not 'Rejected'
status not in 'Rejected'
not in = 'Rejected'

how do i exclude status 'Rejected' here ?


and 2nd help is i have a dbl click even
Code:
="RiskID In(SELECT RiskID FROM QddallA WHERE (status='In progress' and Site='Site1' and duedate<completeddate) or (status='Completed' and Site='Site1' and duedate<completeddate))"
i got a 3rd status type and when i add here another OR - it simple doesnt want to save new changes.
2nd question here is simple - how can i exclude status "Rejected" here as well.

thank u in advance
 

GPGeorge

George Hepworth
Local time
Today, 12:08
Joined
Nov 25, 2004
Messages
2,053
Please explain, in plain words, the logic required to achieve the desired result. Working out what you want from an expression that apparently does not produce that result is a head-scratcher of a challenge to someone who doesn't have the whole picture in front of them.

Also, the typos in this sentence render it somewhat vague. "i have a bextbox that shows me a number accoring control sorce"

Would you mind trying again? Thank you.
 

TipsyWolf

Member
Local time
Today, 22:08
Joined
Mar 20, 2024
Messages
117
Please explain, in plain words, the logic required to achieve the desired result. Working out what you want from an expression that apparently does not produce that result is a head-scratcher of a challenge to someone who doesn't have the whole picture in front of them.

Also, the typos in this sentence render it somewhat vague. "i have a bextbox that shows me a number accoring control sorce"

Would you mind trying again? Thank you.
yeah, my bad.
i have a textbox that shows me a number according to countrol source expression.
and i need to find out how could i exclude criteria (text) in control source expression and in dbl click event as well
 

GPGeorge

George Hepworth
Local time
Today, 12:08
Joined
Nov 25, 2004
Messages
2,053
yeah, my bad.
i have a textbox that shows me a number according to countrol source expression.
and i need to find out how could i exclude criteria (text) in control source expression and in dbl click event as well
That's simply restating the first description of the form and controls on it.

What I was driving at would be the context, a narrative of what logic is required and why it matters. Please tell us the story of the purpose of the data.
 

plog

Banishment Pending
Local time
Today, 14:08
Joined
May 11, 2011
Messages
11,676
Dbguy gave you the answer for your first set of code. For the second, logic has an associative property, so we can group all your status together in one parenthesis set and all the common other criteria in another:



Code:
... WHERE (status='In progress' and Site='Site1' and duedate<completeddate) or (status='Completed' and Site='Site1' and duedate<completeddate))

->

WHERE (Site='Site1' and duedate<completeddate) AND (status='Completed' OR status="In progress" or status="Rejected"))
 

Users who are viewing this thread

Top Bottom