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 / New Users / April 2005

Tip: Looking for answers? Try searching our database.

Criteria in a query to exclude one record.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Robin Chapple - 26 Apr 2005 00:54 GMT
I have a membership database in which the email address is used as the
unique field for reference purposes.

I run a query that seeks to remove email addresses from a mailing list
if they do not appear in the database.

I need one address to be in the mailing list which is not a member
email address.

I have a query which links the email addresses and seeks the "null"
entries in the database and then deletes them from the mailing list.

I have been using this as a criteria:

Is Null And <>"username@aaa.com"

to prevent "username@aaa.com" being deleted and it has been working
for months. Suddenly there are no records in the query in spite of the
fact that if I reduce the criteria to "Is Null" the are eight
including "username@aaa.com".

I am baffled.

Where do I look next?

Thanks,

Robin Chapple
Ken Snell [MVP] - 26 Apr 2005 01:35 GMT
Post the SQL of the query you've been using so we can see how you've
structured it.

Signature

       Ken Snell
<MS ACCESS MVP>

>I have a membership database in which the email address is used as the
> unique field for reference purposes.
[quoted text clipped - 24 lines]
>
> Robin Chapple
Robin Chapple - 27 Apr 2005 06:08 GMT
I have now resolved the problem this way:

SELECT TARDIS_Members.Email, tblDatabase.Email
FROM TARDIS_Members LEFT JOIN tblDatabase ON TARDIS_Members.Email =
tblDatabase.Email
WHERE ((Not (TARDIS_Members.Email)="usernamep@aaa.org") AND
((tblDatabase.Email) Is Null));

Thanks

Robin

>Post the SQL of the query you've been using so we can see how you've
>structured it.
Ed Robichaud - 26 Apr 2005 15:58 GMT
Pretty sure you want to select/delete records that have no email address OR
where the email is not username@aaa.com
-Ed

>I have a membership database in which the email address is used as the
> unique field for reference purposes.
[quoted text clipped - 24 lines]
>
> Robin Chapple
 
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.