Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2003
    Posts
    280

    Unanswered: How do you look up a date in a table by hardcoding in VBA?

    I have try the pound sign (# dateof #) and the amperand(" & dateof & "), and it doesn't work. Any ideas?..

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Combination of both, I think

    ".....Where [DateField] = #" & DateValue & "#"

    If that doesn't work, post your SQL statement or whatever code it is that is failing

    Cheers
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Apr 2003
    Posts
    280
    yeah, I just did what you post up. Actually, I have try this method a couple times before and it didn't work. Weird..Thanks btw..

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    SELECT SomeDate FROM SomeTable WHERE (SomeDate=#1/1/04#);

    -Or-

    "SELECT SomeDate FROM SomeTable WHERE (SomeDate=#" & SomeTxt.Value & "#);"
    Back to Access ... ADO is not the way to go for speed ...

Posting Permissions

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