Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2010
    Posts
    15

    Question Unanswered: Query using Date field not working

    I'm attempting to run an update on a table, and to do so I need to grab a date from my form control (AdmitDate - formatted as short date) and compare it to an existing AdmitDate in my access database (also set to "Short Date")

    So Where clause looks like:

    "Where AdmitDate =" & Me.AdmitDate & "" which generates the SQL just fine as Where AdmitDate = 4/5/2010

    However, I am updating 0 rows no matter what. I can't figure out for the life of me what is going wrong here. Both the text control is shortdate format and the database field is shortdate format. In fact, the AdmitDate text control is what is entered into the database upon record insertion. So the damn date exists and I can see it plain as day in the raw table data. My query just won't pick it up??

    Help please! Any ideas are appreciated!

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14

  3. #3
    Join Date
    Mar 2010
    Posts
    15
    Ahh that worked! I'm a little new to programming in VBA via Access...more of a C# with SQL Server backend guy..

    Silly MS formalities.

Posting Permissions

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