I have a line of code that assigns a date to a record's field (I ONLY need / want the date; not time; not time and date; just the date ...only)
it works as anticipated with one exception:
the date displayed in the document is not what "seems" to be assigned in SQL, it is (always): 30-Dec-1899, and in the record datasheet view it is 12:23:32 AM (also not what i had thought it would be...
Code:
Dim sSQL As String
sSQL = "update tbeAdditionalPages" & _
" Set CatalogDate = " & Date & " WHERE [Type] = '" & Forms![frmSpec].[Type] & "' AND [BaseCatalogSheet]= true;"
'Save current record if it has been modified.
If Me.Dirty Then Me.Dirty = False
CurrentDb.Execute sSQL, dbFailOnError
Me.Requery
the sSQL generates:
"update tbeAdditionalPages Set CatalogDate = 5/18/17 <ie... whatever is today's date> Where [Type] = <etc.> "
I suspect it's something as simple as I need to be wrapping the date in "#"s (?)
many thanks in advance,
mark