To begin: All appropriate form controls and table fields are set as Time/Date fields and in the format of Short Date.
The code works fine except for this sticky issue: When the update is performed, rather than updating the date with DD/MM/YYYY (as it was originally stored), it gives me 12:00:17AM. When I run the code again, it updates the date with 12:00:18am. Then 12:00:19am, even though many MINUTES have passed since I ran the code again.
Am I missing something obvious? The data on the form is in the format DD/MM/YYYY so I don't know why the time is being inserted.
The code works fine except for this sticky issue: When the update is performed, rather than updating the date with DD/MM/YYYY (as it was originally stored), it gives me 12:00:17AM. When I run the code again, it updates the date with 12:00:18am. Then 12:00:19am, even though many MINUTES have passed since I ran the code again.
Am I missing something obvious? The data on the form is in the format DD/MM/YYYY so I don't know why the time is being inserted.
Code:
CurrentDb.Execute "UPDATE [Invoice Details] SET [End Date] = " & Forms![f_ChangeOutTools].[End date] & " WHERE [Invoice Details].ToolID = '" & .Fields!ToolID & "'" & " AND " & "[Invoice Details].InvoiceID = " & Forms![f_ChangeOutTools].[InvoiceID] & ";"