jadeIT
Systems Analyst
- Local time
- Tomorrow, 02:48
- Joined
- Jul 16, 2002
- Messages
- 50
This is a common and simple problem many people (beginners like me) seem to have... but i couldnt find anything to help my specific problem on the forums so..
I am using an SQL statement in a form's code like this (simplified):
SQL = "UPDATE tableName " & _
"SET date = #" & sDate & "# " & _
"WHERE status = 0"
Where sDate is a variable of date type.
When running the code, i get the error "Syntax error in UPDATE statement". As i didnt get this error before when I wasn't updating an actual date field, I'm assuming I'm entering the code wrongly.
I also tried entering the date literally, eg:
SQL = "UPDATE itemsToInvoice " & _
"SET date = #07/07/07# " & _
"WHERE done = 0"
But still the same error.
I'm pretty sure im just typing it wrongly, but what am I doing wrong?
I am using an SQL statement in a form's code like this (simplified):
SQL = "UPDATE tableName " & _
"SET date = #" & sDate & "# " & _
"WHERE status = 0"
Where sDate is a variable of date type.
When running the code, i get the error "Syntax error in UPDATE statement". As i didnt get this error before when I wasn't updating an actual date field, I'm assuming I'm entering the code wrongly.
I also tried entering the date literally, eg:
SQL = "UPDATE itemsToInvoice " & _
"SET date = #07/07/07# " & _
"WHERE done = 0"
But still the same error.
I'm pretty sure im just typing it wrongly, but what am I doing wrong?