Solved stuck on simple issue

TipsyWolf

Member
Local time
Today, 18:01
Joined
Mar 20, 2024
Messages
249
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
 
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.
 
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
 
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.
 
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

Back
Top Bottom