Checking for empty Date/Time fields in Access

Results 1 to 3 of 3

Thread: Checking for empty Date/Time fields in Access

  1. #1
    Branton Boehm Guest

    Default Checking for empty Date/Time fields in Access

    I'm trying to check for an empty Date/Time field in Access and I can't quite figure out how to do it. When I try to print an empty field, it's displayed as "null" but I can't check for that. Any suggestions on how to do it in my SQL statement?

  2. #2 Guest

    Default What have you tried???

    In a query it would be something like this:<BR><BR>Select * from DateTable where DateField is not Null<BR><BR><BR>If you are checking a value retrieved from a db:<BR><BR>If Not IsNull(Rs("DateField")) then DoSomething

  3. #3
    Branton Boehm Guest

    Default RE: What have you tried???

    oRS = oConn.Execute("SELECT * FROM TroubleShooting WHERE DateCompleted IS NOT Null");<BR><BR>It doesn&#039;t work. None of the rows have anything in DateCompleted. But if I take away the WHERE clause, everything prints out as Null. What am I doing wrong?

Posting Permissions

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