Hello,
I am having a problem w/ my UPDATE statement when the date value is included in the statement. I have tried surrounding the date variable (strDate) in "#" and w/ and w/out single quotes to no avail. I doesn't matter if I dimension strDate as a string or a date. I know there must be a simple solution. In short, the UPDATE statement looks like this:
If I remove
then the query works.
These also fail:
Any help would be greatly appreciated. Thanks.
Ken
I am having a problem w/ my UPDATE statement when the date value is included in the statement. I have tried surrounding the date variable (strDate) in "#" and w/ and w/out single quotes to no avail. I doesn't matter if I dimension strDate as a string or a date. I know there must be a simple solution. In short, the UPDATE statement looks like this:
Code:
strSQL = "UPDATE tblTasks SET POC = '" & strPOC & "', Date = #" & strDate & "#, Task = '" & strTask & "' WHERE id = " & lID & ";"
If I remove
Code:
Date = #" & strDate & "#,
These also fail:
Code:
Date = #'" & strDate & "'#,
Code:
Date = '#" & strDate & "#',
Code:
Date = '" & strDate & "',
Any help would be greatly appreciated. Thanks.
Ken