Using a custom form, fields are updated on a newly created record by an operator. When a new record is created there are fields within that newly created record that are to be updated based on values in another field.
For example a field, CustID is updated based on the Primary Key, "PK" as follows: CustID="NW"&Format([PK],"000000")
.
I can perform this update using an update query however, I would like this update to happen automatically immediately following the creation of the new record.
I know I could do this writing VBA code but I prefer not to. I should be able to do this using an event driven Table Macro, After Insert. For some reason I cannot get this to work, now before anyone asks Macros are enabled in the Trust Centre. If I can get this to work, I have other fields that will be updated based on values entered by the operator.
I have set the table Macro as follows:
After Insert
Edit Record
Set Field CustID="NW"&Format([PK],"000000")
I feel this should work but nothing happens. I am making the bold assumption the Edit Record edits the newly created record, is this correct. I cannot find any information and/or examples as to how to successfully use After Insert to modify fields in the newly created record.
Question 1: can this be done?
And 2: If so, how?