Skip to content
Advertisement

Updating Date in Access

I want to simply update a date column within a table where a status exists.

Here’s what I have

UPDATE contracts
SET [Date Cancelled] = 21/06/2021
WHERE status IN (3, 5)

I have tried the following

‘#21/06/2021#’
#21/06/2021#
CDate(‘21-06-2021’)
CDate(‘2021-06-21’)
CDate(‘2021-06-21 00:00:00.0’)

Nothing has gone through, no errors, just not updating.

I can update the field manually.

Advertisement

Answer

Answers were correct, silly issue about the Trust Center ‘enable’ bar not showing, therefore didn’t realise this database location wasn’t set as Trusted, therefore nothing would allow an update.

Once location set as trusted, queries worked, thank you for your replies.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement