79741975

Date: 2025-08-21 07:30:08
Score: 1.5
Natty:
Report link

Okay, I finally managed the sql syntax:

DoCmd.RunSQL "INSERT INTO PlanningChangeLog(" & _
        "ID, TimeStampEdit, UserAccount, Datum, Bestelbon, Transporteur, Productnaam, Tank) " & _
        "SELECT ID, Now() as TimeStampEdit, '" & user & "' as UserAccount, Datum, " & _
        "Bestelbon, Transporteur, Productnaam, Tank FROM Planning " & _
        "WHERE Bestelbon = " & Me.txtSearch & ""

This copies the record to a changelog table, and inserts a timestamp and user account field after the index field.

Thx for all the suggestions!

Reasons:
  • Blacklisted phrase (1): Thx
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Don Quixote