Results 1 to 2 of 2
  1. #1
    darwish is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2014
    Posts
    26

    Search By date (Today)

    hello
    i have a table in my database that contains a date row having date and time.
    in my form i have a search field
    and when i search i am comparing my column in database to a date of format ("MM/DD/YYYY") and i'm not having any result
    my problem is that when i compare this value i want the value in my database to be of format (MM/DD/YYYY") when i compare

    This is the SQL statement i'm using
    strSQL = " SELECT Prints.print_name,Prints.print_dateon FROM Prints WHERE Prints.print_dateon = #" & Date & "#"

    any help is appreciated

    thank you

  2. #2
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    Have you tried :
    WHERE (((CDate([printdate_on]))=[Forms]![Form1]![frmdtField]));

    I suppose, the form field has Format set to ShortDate.

    Thanks

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 11-26-2013, 09:25 AM
  2. Replies: 3
    Last Post: 02-04-2013, 05:24 PM
  3. Replies: 7
    Last Post: 01-28-2013, 05:21 PM
  4. Replies: 5
    Last Post: 10-12-2012, 11:00 AM
  5. Replies: 12
    Last Post: 04-26-2012, 04:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums