Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
MSQuery Parameter in WHERE defaulting to All
I need an Excel parameter prompt where the user can get a list of ALL items
or only the KVI items. I've tried WHERE Unit = [Enter Unit] OR [Enter Unit] IS NULL. It works great in Access, but I get a syntax error in MSQuery. I tried using a single prompt in MSQuery, but when I input % wild card only brings back the K items & non of the nulls. Leaving blank in Excel returns no records. The following is a test SQL that works in MSAccess, but not MSQuery for Excel. The field kvi in the table has K or nulls. SELECT DISTINCT a1.item_id, a1.kvi_id FROM p_item AS a1 WHERE (a1.kvi_id Like [Enter "K" for KVI only]) OR ([Enter "K" for KVI only] Is Null) ORDER BY a1.kvi_id; -- Thanks, Kevin |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Defaulting the margins | Excel Worksheet Functions | |||
How to choose if I use a parameter or not in a parameter query | Excel Discussion (Misc queries) | |||
defaulting to the desktop | Excel Programming | |||
Date Defaulting | Excel Worksheet Functions | |||
Defaulting a cell to 0 | Excel Programming |