Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / December 2007

Tip: Looking for answers? Try searching our database.

where clause <

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Zanstemic - 12 Dec 2007 20:49 GMT
SELECT Events.EventID, Events.EventName
FROM Events
WHERE (((Events.EventID)<27))
ORDER BY Events.EventName;

Currently the query is showing everything in the event list from 1 though
27. I would also like to hide 13, 14, 15, 16.

In Query builder the <27 is in the Criteria field.

Any suggestions on how to best approach this?

Thanks in advance for the help.
fredg - 12 Dec 2007 21:05 GMT
> SELECT Events.EventID, Events.EventName
> FROM Events
[quoted text clipped - 9 lines]
>
> Thanks in advance for the help.

Set the criteria to (using 2 lines as below):
Between 1 and 12
Between 17 and 27

If 27 is the maximum value in any record then you could also use:
<13
>16

By placing the criteria on 2 lines you are creating an "OR" critieria.
Signature

Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

Albert D. Kallal - 12 Dec 2007 23:42 GMT
try:

SELECT EventID, EventName FROM Events
WHERE (EventID  < 27 )
     and
  (eventID not in (13,14,16) )
  ORDER BY EventName;

Signature

Albert D. Kallal    (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@msn.com

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.