Re: How do I create an expresion to exclude two items or NOT EQUAL to.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Jamie wrote:
I am trying exclude two item in a query that I am using. How do I do this in Access 2002?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The items are stored in the column_name. You just set up your criteria
to exclude them:

WHERE column_name Not In ('item1', 'item2')

If the items are numeric data types remove the quotes. If they are Date
data types replace the quotes with #.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBRAYH5IechKqOuFEgEQJH3QCePjQKL5BIngDgX3RBSrqTzbp0IjoAnR75
meUpGWqGK6vhvt6uk177OrWp
=XEgk
-----END PGP SIGNATURE-----
.



Relevant Pages

  • Aging Function
    ... I believe that the problem is just with your DSum ... The reference to the query records Account number must be ... problem with using the accounts as criteria. ... it was a result of the missing single quotes. ...
    (microsoft.public.access.modulesdaovba)
  • Re: BuildCriteria Results --- To Marshall Barton or ?
    ... YOU are not heavy handed Dirk;-) ... I have selectively used the quote approach for criteria from ... the text in quotes, dropping the criteria altogether ... The flexibility and power of BuildCriteria is reduced. ...
    (microsoft.public.access.formscoding)
  • RE: DLook Syntax Help - for Ken Snell
    ... Hope you dont mind my butting in. ... I think the problem may lie in the use of the single and double quotes in the criteria. ... Note that here, CriteriaString is enclosed in single quotes, then a final double quote encloses the whole criteria expression. ...
    (microsoft.public.access.modulesdaovba)
  • RE: DLook Syntax Help - for Ken Snell
    ... Dan ... may lie in the use of the single and double quotes in the ... criteria you would need single quotes as below: ... for more info study the DLookup Help file. ...
    (microsoft.public.access.modulesdaovba)
  • Re: DoCmd.RunSQL Syntax Help
    ... What's the data types of the fields involved? ... missing the quotes you need around the data values. ... If any of the text values can contain single quotes in them, ... Dim sPath As String, sFile As String, sSQL As String ...
    (microsoft.public.access.formscoding)