LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Defaulting the margins Meebers Excel Worksheet Functions 2 December 11th 07 02:50 AM
How to choose if I use a parameter or not in a parameter query Arnaud Excel Discussion (Misc queries) 0 March 8th 07 01:19 PM
defaulting to the desktop Ed Excel Programming 1 December 21st 05 06:15 PM
Date Defaulting Heather Excel Worksheet Functions 2 April 23rd 05 12:00 AM
Defaulting a cell to 0 Erin Excel Programming 1 June 15th 04 02:17 PM


All times are GMT +1. The time now is 04:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"