Results 1 to 2 of 2

Thread: ADO & SQL Date Search

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2000
    Location
    N.Ireland
    Posts
    651
    I am setting an ADO control's recordset in runtime and I want to display the records "SELECT....WHERE DateField = DateVariable"

    DateVariable is input by the user into a text box and then converted from text to date;

    DateField is defined as Data Type Date/Time in an Access Database.

    But when I run the form, a message box 'ado Unknown' comes up.

    What am I doing wrong?
    Gilly

  2. #2
    Lively Member
    Join Date
    Jun 2000
    Location
    Ontario, Canada.
    Posts
    85

    Cool

    I don't know if this will help but I think you just need
    to put the right syntax around the data variable.
    Like This:

    "SELECT....WHERE DateField = #" & DateVariable & "#"

    Hope this helps.




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