Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004

    Unanswered: Date parameter in SQL query

    Attempting to create SQl query in Access that will prompt user to input a date, but keep getting syntax errors or data type mismatch depending on the wildcard used around the parameter portion of query below:

    sSql = "UPDATE TableName " & _
    " SET TableName.FieldName = 'value' " & _
    " where TableName.FieldName <= #[Enter Last Day of the Previous Month]#;"
    db.Execute sSql

  2. #2
    Join Date
    Sep 2003
    Oh boy ... The Execute method DOES NOT prompt for parameters ... It is not a stored query. Right now, it's trying to translate "[Enter Last Day of the Previous Month]" into a date causing your blowup ...
    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