Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2003
    Posts
    2

    Question Unanswered: Need a little help

    Hi,

    First time here. Looks quite nice. I have a little problem with something. I'm trying to send out e-mails using Persits Email Component. I have an access database with a row called (Email) and several emails inside of it (About 10 emails). How to i form my SQL Query and what should i do so that when i get to this

    Code:
    	Set Mail = Server.CreateObject("Persits.MailSender")
    	Mail.AddAddress EmailList
    It send the email to everybody that had an email in that row. Thanks for any help provided, very much appreciated.

  2. #2
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    Depending on whether that email field is NULL or just empty (I can't remember if Access has NULL fields or not) then your SQL would look like:

    (If using NULL for blank fields)
    SELECT * FROM myTable WHERE Email != NULL

    (If using empty fields)
    SELECT * FROM myTable WHERE Email != ''

    myTable is the name of the table with the Email field and '' are two 'single quotes'

    If all you want is the email address in the recordset, replace "*" with "Email"
    Last edited by Seppuku; 10-21-03 at 12:21.
    That which does not kill me postpones the inevitable.

  3. #3
    Join Date
    Oct 2003
    Posts
    706

    Exclamation

    Originally posted by Seppuku
    Depending on whether that email field is NULL or just empty (I can't remember if Access has NULL fields or not) then your SQL would look like:

    (If using NULL for blank fields)
    SELECT * FROM myTable WHERE Email != NULL
    Yes, MS-Access does support NULLs. And I think you'll find that it won't accept != NULL.

    I think you'll find it wants IS NOT NULL.

    Because NULL denotes "the absence of a value" it plays by some special rules.
    ChimneySweep(R): fast, automatic
    table repair at a click of the
    mouse! http://www.sundialservices.com

  4. #4
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    my bad... I stand corrected... haven't had to query for nulls (or lack thereof) in some time...
    That which does not kill me postpones the inevitable.

  5. #5
    Join Date
    Oct 2003
    Posts
    2
    Thank you very much works like a charm !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •