CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2000
    Location
    Pennsylvania, United States
    Posts
    106

    ADO FILTERING / DATES

    I am trying to filter an ADO recordset.

    I am using something like

    rsSomething.Filter = "StartDate = " & _
    format(dtStartDate, "mm/dd/yyyy")




    This works except that nulls do not want to
    cooperate.

    Please let me know if you know the correct syntax
    for using date comparisons / nulls in the filter
    method.

    Thanks Everyone
    -David


  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477

    Re: ADO FILTERING / DATES

    This is because null is not the date specified. if you want to select all the null dates, use this

    rsSomething.Filter = "StartDate is null"




    Tom Cannaerts
    [email protected]

    The best way to escape a problem, is to solve it.
    Tom Cannaerts
    email: [email protected]
    www.tom.be (dutch site)

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

Featured