value >=1000 if checkbox checked

supmktg

Registered User.
Local time
Today, 11:06
Joined
Mar 25, 2002
Messages
360
I've been scratching my head all night, can someone tell me why the attached query doesn't work?

Thanks,

Sup
 

Attachments

You have used True in your query, so what you are trying to say is that the check box is ticked.

You actually need to put -1, as -1 = True, and 0 = False

I hope this helps.
 
Last edited:
RE : value >=1000 if checkbox checked

I have taken the liberty of amending your sample dbase
See attached zip file
 

Attachments

M8KWR - replacing True with -1 didn't do it?

Smart - your example works, but I really prefer not to use two seperate queries if I can avoid it. The >= 1000 criteria in my sample is part of a much more complex query that is the record source of several reports.

I don't understand why my where clause in this sql doesn't work:
Code:
SELECT ToolDescCost.ITEM_NUMBER, ToolDescCost.PRODUCT_COST
FROM ToolDescCost
WHERE (((ToolDescCost.PRODUCT_COST)=IIf([Forms]![Form1]![chk1000plus]=-1,([ToolDescCost].[PRODUCT_COST])>=1000,([ToolDescCost].[PRODUCT_COST])>=0)));

while this sql does work:
Code:
SELECT ToolDescCost.ITEM_NUMBER, ToolDescCost.PRODUCT_COST
FROM ToolDescCost
WHERE (((ToolDescCost.ITEM_NUMBER) Like IIf([Forms]![Form1]![chk1000plus]=-1,"*127*","*")));

Can someone explain?

I appreciate the help, this is driving me nuts!

Sup
 

Users who are viewing this thread

Back
Top Bottom