Results 1 to 5 of 5

Thread: where field is blank (How to do?)

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2009
    Posts
    876

    where field is blank (How to do?)

    Hi guys im using the following code to check the database and add the date to a listview


    Set rs = db.OpenRecordset("SELECT * FROM `Leads` WHERE `Agent` = " & "'" & Form1.Text1.Text & "' AND `Calling From` = " & "'" & Form4.Combo1.Text & "' AND `Date` = '' ")



    I am wondering how can i make it only display the records that have a blank Date field?

    At the moment it dont show any date that has a blank date field. How can i make it display them only?

    thanks

  2. #2
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141

    Re: where field is blank (How to do?)

    How about

    And Date Is Null

  3. #3
    Frenzied Member
    Join Date
    Jan 2009
    Location
    Watch Window(Shift+f9)
    Posts
    1,879

    Re: where field is blank (How to do?)

    At the moment it dont show any date that has a blank date field. How can i make it display them only?
    You need to put some date inside the Date= " "

  4. #4
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: where field is blank (How to do?)

    Quote Originally Posted by firoz.raj View Post
    You need to put some date inside the Date= " "
    I think that's just exactly what he doesn't want


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  5. #5
    Frenzied Member
    Join Date
    Jan 2009
    Location
    Watch Window(Shift+f9)
    Posts
    1,879

    Re: where field is blank (How to do?)


    I am wondering how can i make it only display the records that have a blank Date field?
    oh sorry, for my previous post .just you need to check Null value in your sql statment .
    Last edited by firoz.raj; Aug 16th, 2012 at 10:05 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width