1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

ignoring null value in recordset

Discussion in 'Business Applications' started by nickblitz, Nov 15, 2012.

Thread Status:
Not open for further replies.
  1. nickblitz

    nickblitz Thread Starter

    Oct 29, 2012
    i have this code here to send out email... it works fine but it does not skip through the blank spaces in the recordset.

    can anyone help me?
    how do i incorporate the find null thing into this??

    Private Sub Command35_Click()
    Dim MyDb As DAO.Database
    Dim rsEmail As DAO.Recordset
    Dim strEmailAddress
    Set MyDb = CurrentDb()
    Set rsEmail = MyDb.OpenRecordset("Query Full Director", dbOpenSnapshot)
    Do Until rsEmail.EOF
    strEmailAddress = strEmailAddress & rsEmail("Secondary Email") & ";"
    strEmailAddress = Left(strEmailAddress, Len(strEmailAddress) - 1)
    DoCmd.SendObject , , acFormatRTF, strEmailAddress, _
    , , strSubject, strEMailMsg, True, False
    Set rst = Nothing
    End Sub
  2. OBP


    Mar 8, 2005
    It needs to be done in the Query called "Query Full Director".
    Which is the field or fields that are Null?

    You can exclude Records with null values by entering
    Is Not Null
    in the first Criteria Row of the field that might be Null.
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1076926

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice