Re: Problem updating a Date value into Access DB



<jtrainaldi@xxxxxxxxx> wrote in message
news:1165348259.679086.307290@xxxxxxxxxxxxxxxxxxxxxxxxxxx
I have tried everything with updating a database record and it still
errors on the date.

I have tried the following

SQL_query_courseUpd = "UPDATE courses SET [date] = #" & _
Format$(date1,"mm/dd/yyyy") & "# WHERE courseID = '" & courseID & "'"

"date" is a bad choice for a field name because it's a reserved word so you
have to escape it by using "[date]"

Jet needs dates to be in the format #mm/dd/yyyy# or #yyyy-mm-dd# for
consistent results; if you don't specify a format and the local PC uses
dd/mm/yyyy formatting then you will be recording the wrong dates

--
Reply to the group so all can participate
VB.Net: "Fool me once..."

.