Results 1 to 2 of 2

Thread: Simple Select Date Problem

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2004
    Location
    Home
    Posts
    85

    Simple Select Date Problem

    Hi There

    I know this is simple but I am having problems with the following statement, I have records in the database where the required field is todays date but I cant seem to list them with the following -

    Set adoduecallbacks = New Recordset

    adoduecallbacks.Open "select * from tblcontacts where dtrmrecontactdate = " & Date, db, adOpenStatic, adLockOptimistic
    Set DataGrid5.DataSource = adoduecallbacks
    DataGrid5.Refresh


    I have moved from a ADO data contraol to code ( the recodsource for the ADO control was "select * from tblcontacts where dtmrecontactdate = date()" which worked.

    Thank you in advance!

  2. #2
    Banned jhermiz's Avatar
    Join Date
    Jun 2002
    Location
    Antarctica
    Posts
    2,492

    Re: Simple Select Date Problem

    SELECT * FROM blah WHERE SomeDate =#" & Format(Now, "dd-mmm-yy") & "#"

    Jon

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